es版本7.6.2, match_phrase_prefix搜索结果和搜索词的前缀不匹配
这是我的搜索条件
{ "query" :{ "match_phrase_prefix": { "name": { "query": "奶" } } } }
{ "_index" : "test_index2", "_type" : "_doc", "_id" : "3ooVRIwBM2RKK1WvFNUC", "_score" : 0.40264052, "_source" : { "name" : "姨奶奶" } }, { "_index" : "test_index2", "_type" : "_doc", "_id" : "2IofQ4wBM2RKK1Wv5tX5", "_score" : 0.3398124, "_source" : { "name" : "奶盖" } }, { "_index" : "test_index2", "_type" : "_doc", "_id" : "14ofQ4wBM2RKK1WvgdWm", "_score" : 0.26098993, "_source" : { "name" : "牛奶好喝" } }, { "_index" : "test_index2", "_type" : "_doc", "_id" : "2YogQ4wBM2RKK1WvgNX1", "_score" : 0.26098993, "_source" : { "name" : "旺仔牛奶" } }
这个是搜索结果,很多结果并不是以奶开头*
修改max_expansions或者slop的值都没有用