Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 org.apache.lucene.search.BooleanQuery 的 add 方法中,我没有区分 Occur.SHOULD 和 Occur.MUST。谁能解释一下?
BooleanClause.Occur.Must代表一个Mandatory子句。应满足该条款才能返回结果。基本上AND。
BooleanClause.Occur.Must
Mandatory
AND
BooleanClause.Occur.SHOULD代表optional子句,行为类似于OR
BooleanClause.Occur.SHOULD
optional
OR
对于 Solr ,在调试查询说明BooleanClause.Occur.Must中标有,而没有与之关联的符号。+BooleanClause.Occur.SHOULD
+