public class TermsQueryBuilder extends BaseQueryBuilder implements BoostableQueryBuilder<TermsQueryBuilder>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
EMPTY_PARAMS
Constructor and Description |
---|
TermsQueryBuilder(String name,
Collection values)
A query for a field based on several terms matching on any of them.
|
TermsQueryBuilder(String name,
double... values)
A query for a field based on several terms matching on any of them.
|
TermsQueryBuilder(String name,
float... values)
A query for a field based on several terms matching on any of them.
|
TermsQueryBuilder(String name,
int... values)
A query for a field based on several terms matching on any of them.
|
TermsQueryBuilder(String name,
long... values)
A query for a field based on several terms matching on any of them.
|
TermsQueryBuilder(String name,
Object... values)
A query for a field based on several terms matching on any of them.
|
TermsQueryBuilder(String name,
String... values)
A query for a field based on several terms matching on any of them.
|
Modifier and Type | Method and Description |
---|---|
TermsQueryBuilder |
boost(float boost)
Sets the boost for this query.
|
TermsQueryBuilder |
disableCoord(boolean disableCoord)
Disables Similarity#coord(int,int) in scoring.
|
protected void |
doXContent(XContentBuilder builder,
ToXContent.Params params) |
TermsQueryBuilder |
minimumMatch(int minimumMatch)
Sets the minimum number of matches across the provided terms.
|
TermsQueryBuilder |
minimumShouldMatch(String minimumShouldMatch) |
TermsQueryBuilder |
queryName(String queryName)
Sets the query name for the filter that can be used when searching for matched_filters per hit.
|
buildAsBytes, buildAsBytes, toString, toXContent
public TermsQueryBuilder(String name, String... values)
name
- The field namevalues
- The termspublic TermsQueryBuilder(String name, int... values)
name
- The field namevalues
- The termspublic TermsQueryBuilder(String name, long... values)
name
- The field namevalues
- The termspublic TermsQueryBuilder(String name, float... values)
name
- The field namevalues
- The termspublic TermsQueryBuilder(String name, double... values)
name
- The field namevalues
- The termspublic TermsQueryBuilder(String name, Object... values)
name
- The field namevalues
- The termspublic TermsQueryBuilder(String name, Collection values)
name
- The field namevalues
- The termspublic TermsQueryBuilder minimumMatch(int minimumMatch)
public TermsQueryBuilder minimumShouldMatch(String minimumShouldMatch)
public TermsQueryBuilder boost(float boost)
boost
in interface BoostableQueryBuilder<TermsQueryBuilder>
public TermsQueryBuilder disableCoord(boolean disableCoord)
public TermsQueryBuilder queryName(String queryName)
protected void doXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
doXContent
in class BaseQueryBuilder
IOException
Copyright © 2009–2015. All rights reserved.