要不要再翻翻文档呢?

ik分词时遇到括号不拆分如何处理

Elasticsearch | 作者 sunset535 | 发布于2021年05月26日 | 阅读数:1401

当前现状:
GET /_analyze?pretty
{
    "analyzer": "ik_smart",
    "text": "奥迪A4(进口)"
}
返回结果:
{
    "tokens": [
        {
            "token": "奥迪",
            "start_offset": 0,
            "end_offset": 2,
            "type": "CN_WORD",
            "position": 0
        },
        {
            "token": "a4",
            "start_offset": 2,
            "end_offset": 4,
            "type": "LETTER",
            "position": 1
        },
        {
            "token": "进口",
            "start_offset": 5,
            "end_offset": 7,
            "type": "CN_WORD",
            "position": 2
        }
    ]
}
 
期望结果: 奥迪、A4(进口)
这个应该怎么处理
已邀请:

要回复问题请先登录注册