public class BooleanQuery extends AbstractQuery
mapper
Modifier and Type | Method and Description |
---|---|
BooleanQuery |
optional(AbstractNodeQuery node)
Adds a boolean clause with a
BooleanClause.Occur.SHOULD operator. |
BooleanQuery |
setBoost(float boost)
Sets the boost for this query.
|
org.apache.lucene.search.BooleanQuery |
toQuery(boolean proxy)
Convert the constructed query into a
Query . |
BooleanQuery |
with(AbstractNodeQuery node)
Adds a boolean clause with a
BooleanClause.Occur.MUST operator. |
BooleanQuery |
without(AbstractNodeQuery node)
Adds a boolean clause with a
BooleanClause.Occur.MUST_NOT operator. |
toString
public BooleanQuery setBoost(float boost)
AbstractQuery
setBoost
in class AbstractQuery
Query#setBoost(float)}
public BooleanQuery with(AbstractNodeQuery node)
BooleanClause.Occur.MUST
operator.
Use this method for clauses that must appear in the matching documents.
org.apache.lucene.search.BooleanClause.Occur#MUST}
public BooleanQuery without(AbstractNodeQuery node)
BooleanClause.Occur.MUST_NOT
operator.
Use this method for clauses that must not appear in the matching documents.
org.apache.lucene.search.BooleanClause.Occur#MUST}
public BooleanQuery optional(AbstractNodeQuery node)
BooleanClause.Occur.SHOULD
operator.
Use this method for clauses that should appear in the matching documents.
org.apache.lucene.search.BooleanClause.Occur#SHOULD}
public org.apache.lucene.search.BooleanQuery toQuery(boolean proxy) throws org.apache.lucene.queryparser.flexible.core.QueryNodeException
AbstractQuery
Query
.toQuery
in class AbstractQuery
proxy
- Should the query be wrapped into a LuceneProxyNodeQuery
?org.apache.lucene.queryparser.flexible.core.QueryNodeException
Copyright © 2014. All rights reserved.