|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.elasticsearch.index.query.FilterBuilders
public abstract class FilterBuilders
A static factory for simple "import static" usage.
Method Summary | |
---|---|
static AndFilterBuilder |
andFilter(FilterBuilder... filters)
|
static BoolFilterBuilder |
boolFilter()
|
static ExistsFilterBuilder |
existsFilter(java.lang.String name)
A filter to filter only documents where a field exists in them. |
static GeoBoundingBoxFilterBuilder |
geoBoundingBoxFilter(java.lang.String name)
A filter to filter based on a bounding box defined by top left and bottom right locations / points |
static GeoDistanceFilterBuilder |
geoDistanceFilter(java.lang.String name)
A filter to filter based on a specific distance from a specific geo location / point. |
static GeoDistanceRangeFilterBuilder |
geoDistanceRangeFilter(java.lang.String name)
A filter to filter based on a specific range from a specific geo location / point. |
static GeoPolygonFilterBuilder |
geoPolygonFilter(java.lang.String name)
A filter to filter based on a polygon defined by a set of locations / points. |
static HasChildFilterBuilder |
hasChildFilter(java.lang.String type,
QueryBuilder query)
Constructs a child filter, with the child type and the query to run against child documents, with the result of the filter being the *parent* documents. |
static IdsFilterBuilder |
idsFilter(java.lang.String... types)
Creates a new ids filter with the provided doc/mapping types. |
static TermsFilterBuilder |
inFilter(java.lang.String name,
double... values)
A filer for a field based on several terms matching on any of them. |
static TermsFilterBuilder |
inFilter(java.lang.String name,
float... values)
A filer for a field based on several terms matching on any of them. |
static TermsFilterBuilder |
inFilter(java.lang.String name,
int... values)
A filer for a field based on several terms matching on any of them. |
static TermsFilterBuilder |
inFilter(java.lang.String name,
long... values)
A filer for a field based on several terms matching on any of them. |
static TermsFilterBuilder |
inFilter(java.lang.String name,
java.lang.Object... values)
A filer for a field based on several terms matching on any of them. |
static TermsFilterBuilder |
inFilter(java.lang.String name,
java.lang.String... values)
A filer for a field based on several terms matching on any of them. |
static LimitFilterBuilder |
limitFilter(int limit)
A filter that limits the results to the provided limit value (per shard!). |
static MatchAllFilterBuilder |
matchAllFilter()
A filter that matches all documents. |
static MissingFilterBuilder |
missingFilter(java.lang.String name)
A filter to filter only documents where a field does not exists in them. |
static NestedFilterBuilder |
nestedFilter(java.lang.String path,
FilterBuilder filter)
|
static NestedFilterBuilder |
nestedFilter(java.lang.String path,
QueryBuilder query)
|
static NotFilterBuilder |
notFilter(FilterBuilder filter)
|
static NumericRangeFilterBuilder |
numericRangeFilter(java.lang.String name)
A filter that restricts search results to values that are within the given numeric range. |
static OrFilterBuilder |
orFilter(FilterBuilder... filters)
|
static PrefixFilterBuilder |
prefixFilter(java.lang.String name,
java.lang.String prefix)
A filter that restricts search results to values that have a matching prefix in a given field. |
static QueryFilterBuilder |
queryFilter(QueryBuilder queryBuilder)
A filter that simply wraps a query. |
static RangeFilterBuilder |
rangeFilter(java.lang.String name)
A filter that restricts search results to values that are within the given range. |
static ScriptFilterBuilder |
scriptFilter(java.lang.String script)
A builder for filter based on a script. |
static TermFilterBuilder |
termFilter(java.lang.String name,
double value)
A filter for a field based on a term. |
static TermFilterBuilder |
termFilter(java.lang.String name,
float value)
A filter for a field based on a term. |
static TermFilterBuilder |
termFilter(java.lang.String name,
int value)
A filter for a field based on a term. |
static TermFilterBuilder |
termFilter(java.lang.String name,
long value)
A filter for a field based on a term. |
static TermFilterBuilder |
termFilter(java.lang.String name,
java.lang.Object value)
A filter for a field based on a term. |
static TermFilterBuilder |
termFilter(java.lang.String name,
java.lang.String value)
A filter for a field based on a term. |
static TermsFilterBuilder |
termsFilter(java.lang.String name,
double... values)
A filer for a field based on several terms matching on any of them. |
static TermsFilterBuilder |
termsFilter(java.lang.String name,
float... values)
A filer for a field based on several terms matching on any of them. |
static TermsFilterBuilder |
termsFilter(java.lang.String name,
int... values)
A filer for a field based on several terms matching on any of them. |
static TermsFilterBuilder |
termsFilter(java.lang.String name,
long... values)
A filer for a field based on several terms matching on any of them. |
static TermsFilterBuilder |
termsFilter(java.lang.String name,
java.lang.Object... values)
A filer for a field based on several terms matching on any of them. |
static TermsFilterBuilder |
termsFilter(java.lang.String name,
java.lang.String... values)
A filer for a field based on several terms matching on any of them. |
static TypeFilterBuilder |
typeFilter(java.lang.String type)
A filter based on doc/mapping type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static MatchAllFilterBuilder matchAllFilter()
public static LimitFilterBuilder limitFilter(int limit)
public static NestedFilterBuilder nestedFilter(java.lang.String path, QueryBuilder query)
public static NestedFilterBuilder nestedFilter(java.lang.String path, FilterBuilder filter)
public static IdsFilterBuilder idsFilter(@Nullable java.lang.String... types)
types
- The types to match the ids against.public static TypeFilterBuilder typeFilter(java.lang.String type)
public static TermFilterBuilder termFilter(java.lang.String name, java.lang.String value)
name
- The field namevalue
- The term valuepublic static TermFilterBuilder termFilter(java.lang.String name, int value)
name
- The field namevalue
- The term valuepublic static TermFilterBuilder termFilter(java.lang.String name, long value)
name
- The field namevalue
- The term valuepublic static TermFilterBuilder termFilter(java.lang.String name, float value)
name
- The field namevalue
- The term valuepublic static TermFilterBuilder termFilter(java.lang.String name, double value)
name
- The field namevalue
- The term valuepublic static TermFilterBuilder termFilter(java.lang.String name, java.lang.Object value)
name
- The field namevalue
- The term valuepublic static TermsFilterBuilder termsFilter(java.lang.String name, java.lang.String... values)
name
- The field namevalues
- The termspublic static TermsFilterBuilder termsFilter(java.lang.String name, int... values)
name
- The field namevalues
- The termspublic static TermsFilterBuilder termsFilter(java.lang.String name, long... values)
name
- The field namevalues
- The termspublic static TermsFilterBuilder termsFilter(java.lang.String name, float... values)
name
- The field namevalues
- The termspublic static TermsFilterBuilder termsFilter(java.lang.String name, double... values)
name
- The field namevalues
- The termspublic static TermsFilterBuilder termsFilter(java.lang.String name, java.lang.Object... values)
name
- The field namevalues
- The termspublic static TermsFilterBuilder inFilter(java.lang.String name, java.lang.String... values)
name
- The field namevalues
- The termspublic static TermsFilterBuilder inFilter(java.lang.String name, int... values)
name
- The field namevalues
- The termspublic static TermsFilterBuilder inFilter(java.lang.String name, long... values)
name
- The field namevalues
- The termspublic static TermsFilterBuilder inFilter(java.lang.String name, float... values)
name
- The field namevalues
- The termspublic static TermsFilterBuilder inFilter(java.lang.String name, double... values)
name
- The field namevalues
- The termspublic static TermsFilterBuilder inFilter(java.lang.String name, java.lang.Object... values)
name
- The field namevalues
- The termspublic static PrefixFilterBuilder prefixFilter(java.lang.String name, java.lang.String prefix)
name
- The field nameprefix
- The prefixpublic static RangeFilterBuilder rangeFilter(java.lang.String name)
name
- The field namepublic static NumericRangeFilterBuilder numericRangeFilter(java.lang.String name)
name
- The field namepublic static QueryFilterBuilder queryFilter(QueryBuilder queryBuilder)
queryBuilder
- The query to wrap as a filterpublic static ScriptFilterBuilder scriptFilter(java.lang.String script)
script
- The script to filter by.public static GeoDistanceFilterBuilder geoDistanceFilter(java.lang.String name)
name
- The location field name.public static GeoDistanceRangeFilterBuilder geoDistanceRangeFilter(java.lang.String name)
name
- The location field name.public static GeoBoundingBoxFilterBuilder geoBoundingBoxFilter(java.lang.String name)
name
- The location field name.public static GeoPolygonFilterBuilder geoPolygonFilter(java.lang.String name)
name
- The location field name.public static ExistsFilterBuilder existsFilter(java.lang.String name)
name
- The name of the fieldpublic static MissingFilterBuilder missingFilter(java.lang.String name)
name
- The name of the fieldpublic static HasChildFilterBuilder hasChildFilter(java.lang.String type, QueryBuilder query)
type
- The child typequery
- The query to run against the child typepublic static BoolFilterBuilder boolFilter()
public static AndFilterBuilder andFilter(FilterBuilder... filters)
public static OrFilterBuilder orFilter(FilterBuilder... filters)
public static NotFilterBuilder notFilter(FilterBuilder filter)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |