We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
对一个字段同时使用ik分词和拼音分词,对该字段进行搜索时,返回高亮范围扩大了,比如: content字段使用了ik分词+拼音分词,有一条数据的content是“这是一个未命名的帖子”,现在对该字段进行搜索,搜索内容为“ming”,返回数据高亮为“未命名”,但是期望的结果是“命”和“名”高亮,这种情况有什么解决方案吗? 查询: { "query": { "match": { "content.fpy": "ming" } }, "highlight": { "fields": { "content.fpy": {} } } } 结果: "hits" : [ { "_index" : "zwx_test2", "_type" : "_doc", "_id" : "vAfNj3sBAXo3GeO_puzJ", "_score" : 0.51007897, "_source" : { "content" : "这是一个未命名的帖子" }, "highlight" : { "content.fpy" : [ "这是一个未命名的帖子" ] } } ]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
对一个字段同时使用ik分词和拼音分词,对该字段进行搜索时,返回高亮范围扩大了,比如:
content字段使用了ik分词+拼音分词,有一条数据的content是“这是一个未命名的帖子”,现在对该字段进行搜索,搜索内容为“ming”,返回数据高亮为“未命名”,但是期望的结果是“命”和“名”高亮,这种情况有什么解决方案吗?
查询:
{
"query": {
"match": {
"content.fpy": "ming"
}
},
"highlight": {
"fields": {
"content.fpy": {}
}
}
}
结果:
"hits" : [
{
"_index" : "zwx_test2",
"_type" : "_doc",
"_id" : "vAfNj3sBAXo3GeO_puzJ",
"_score" : 0.51007897,
"_source" : {
"content" : "这是一个未命名的帖子"
},
"highlight" : {
"content.fpy" : [
"这是一个未命名的帖子"
]
}
}
]
The text was updated successfully, but these errors were encountered: