public class PrefixFilterBuilder extends BaseFilterBuilder
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
EMPTY_PARAMS
Constructor and Description |
---|
PrefixFilterBuilder(String name,
String prefix)
A filter that restricts search results to values that have a matching prefix in a given
field.
|
Modifier and Type | Method and Description |
---|---|
PrefixFilterBuilder |
cache(boolean cache)
Should the filter be cached or not.
|
PrefixFilterBuilder |
cacheKey(String cacheKey) |
void |
doXContent(XContentBuilder builder,
ToXContent.Params params) |
PrefixFilterBuilder |
filterName(String filterName)
Sets the filter name for the filter that can be used when searching for matched_filters per hit.
|
buildAsBytes, buildAsBytes, toString, toXContent
public PrefixFilterBuilder filterName(String filterName)
public PrefixFilterBuilder cache(boolean cache)
public PrefixFilterBuilder cacheKey(String cacheKey)
public void doXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
doXContent
in class BaseFilterBuilder
IOException
Copyright © 2009–2015. All rights reserved.