我的目标是使用ElasticSearch查找可以在正在查询的段落内找到哪些索引短语。
我尝试使用渗滤搜索,但无法将其优化为100%匹配。可悲的是,ElasticSearch文档还不够清晰。
我的索引文件:
我的查询:
"We are looking for an animal that must be able to stand on two feet, also must jump higher than a tree, and should be faster than 40mph, and has white and red stripes with wings"
我期望什么结果(完全匹配,不区分大小写):
我得到什么结果(部分比赛):
最佳答案
but I wasn't able to refine it to be a 100% match
似乎您需要像full-text query一样使用Match Phrase Query。从docs:
The high-level full text queries are usually used for running full text queries on full text fields like the body of an email.
关于elasticsearch - 如何将段落与ElasticSearch中的短语匹配?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54295959/