美文网首页
Elasticsearch 查询区别

Elasticsearch 查询区别

作者: yl莫言xw | 来源:发表于2017-09-15 15:48 被阅读0次

我们知道在Elasticsearch中我们可以进行全文检索,那如果才能准确的检索到自己想要的数据能,Elasticsearch提供了两种匹配数据的方式:

match

match匹配属于相关性查询,如官方例子:

GET/megacorp/employee/_search

{"query":{"match":{"about":"rock climbing"}}}

他的查询也会查收出跟rock或者跟climbing相关的数据

match_phrase

match_phrase的查询会查出精确的数据,如我们查询rock climbing的数据时,他只会查询完全匹配的数据

相关文章

网友评论

      本文标题:Elasticsearch 查询区别

      本文链接:https://www.haomeiwen.com/subject/ubossxtx.html