|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.elasticsearch.index.query.xcontent.BaseQueryBuilder
org.elasticsearch.index.query.xcontent.BoolQueryBuilder
public class BoolQueryBuilder
A Query that matches documents matching boolean combinations of other queries.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent |
---|
ToXContent.MapParams, ToXContent.Params |
Field Summary |
---|
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent |
---|
EMPTY_PARAMS |
Constructor Summary | |
---|---|
BoolQueryBuilder()
|
Method Summary | |
---|---|
BoolQueryBuilder |
boost(float boost)
Sets the boost for this query. |
java.util.List<org.elasticsearch.index.query.xcontent.BoolQueryBuilder.Clause> |
clauses()
A list of the current clauses. |
BoolQueryBuilder |
disableCoord(boolean disableCoord)
Disables Similarity#coord(int,int) in scoring. |
protected void |
doXContent(XContentBuilder builder,
ToXContent.Params params)
|
BoolQueryBuilder |
minimumNumberShouldMatch(int minimumNumberShouldMatch)
Specifies a minimum number of the optional (should) boolean clauses which must be satisfied. |
BoolQueryBuilder |
must(XContentQueryBuilder queryBuilder)
Adds a query that must appear in the matching documents. |
BoolQueryBuilder |
mustNot(XContentQueryBuilder queryBuilder)
Adds a query that must not appear in the matching documents. |
BoolQueryBuilder |
should(XContentQueryBuilder queryBuilder)
Adds a query that should appear in the matching documents. |
Methods inherited from class org.elasticsearch.index.query.xcontent.BaseQueryBuilder |
---|
buildAsBytes, buildAsBytes, buildAsUnsafeBytes, buildAsUnsafeBytes, toXContent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BoolQueryBuilder()
Method Detail |
---|
public BoolQueryBuilder must(XContentQueryBuilder queryBuilder)
public BoolQueryBuilder mustNot(XContentQueryBuilder queryBuilder)
public BoolQueryBuilder should(XContentQueryBuilder queryBuilder)
SHOULD
clauses must match a document
for the BooleanQuery to match.
minimumNumberShouldMatch(int)
public BoolQueryBuilder boost(float boost)
public BoolQueryBuilder disableCoord(boolean disableCoord)
public BoolQueryBuilder minimumNumberShouldMatch(int minimumNumberShouldMatch)
By default no optional clauses are necessary for a match (unless there are no required clauses). If this method is used, then the specified number of clauses is required.
Use of this method is totally independent of specifying that any specific clauses are required (or prohibited). This number will only be compared against the number of matching optional clauses.
minimumNumberShouldMatch
- the number of optional clauses that must matchpublic java.util.List<org.elasticsearch.index.query.xcontent.BoolQueryBuilder.Clause> clauses()
protected void doXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
doXContent
in class BaseQueryBuilder
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |