public class PrefixQueryBuilder extends MultiTermQueryBuilder implements BoostableQueryBuilder<PrefixQueryBuilder>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
EMPTY_PARAMS
Constructor and Description |
---|
PrefixQueryBuilder(String name,
String prefix)
A Query that matches documents containing terms with a specified prefix.
|
Modifier and Type | Method and Description |
---|---|
PrefixQueryBuilder |
boost(float boost)
Sets the boost for this query.
|
void |
doXContent(XContentBuilder builder,
ToXContent.Params params) |
PrefixQueryBuilder |
queryName(String queryName)
Sets the query name for the filter that can be used when searching for matched_filters per hit.
|
PrefixQueryBuilder |
rewrite(String rewrite) |
toXContent
buildAsBytes, buildAsBytes, toString
public PrefixQueryBuilder boost(float boost)
boost
in interface BoostableQueryBuilder<PrefixQueryBuilder>
public PrefixQueryBuilder rewrite(String rewrite)
public PrefixQueryBuilder queryName(String queryName)
public void doXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
doXContent
in class QueryBuilder
IOException
Copyright © 2009–2016. All rights reserved.