lasticsearch的查询关系OR AND

来源:互联网 发布:行政审批窗口知乎 编辑:程序博客网 时间:2024/06/05 18:54

elasticsearch的查询关系OR AND
must means: The clause (query) must appear in matching documents. These clauses must match, like logical AND.

should means: At least one of these clauses must match, like logical OR.

Basically they are used like logical operators AND and OR. See this.

Now in a bool query:

must means: Clauses that must match for the document to be included.

should means: If these clauses match, they increase the _score; otherwise, they have no effect. They are simply used to refine the relevance score for each document.

0 0
原创粉丝点击