Favor exact matches over ngram matches in ElasticSearch when mapping

你说的曾经没有我的故事 提交于 2019-12-04 03:01:04

I don't believe there is anyway to apply boosting to an analyzer as you're suggesting.

One thing you can try, is to use the multi field type in your mapping. You could then apply your partial_name analyzer to one version of the field, and your full_name analyzer to the other version.

With this mapping, you could query both fields differently, but combined (perhaps in a bool query), and apply a boost to the query that is being conducted on the full_name analyzed field.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!