Class Query
- java.lang.Object
-
- org.dashbuilder.dataprovider.backend.elasticsearch.rest.model.Query
-
public class Query extends Object
An ElasticSearch query representation.
Generates a group of ElasticSearch queries and filters to run from a the previous pasing of a DataSetFilter.
Parameters for each query type:
-
Query - Boolean
- must - Contains a List of other Query objects.
- must_not - Contains a List of other Query objects.
- should - Contains a List of other Query objects.
-
Query - Match
- value - The value to match.
-
Query - Match All
-
Query - Filtered
- query - The query.
- filter - The filter for this query.
-
Filter - And
- filters - Contains a List of other filters.
-
Filter - Or
- filters - Contains a List of other filters.
-
Filter - Not
- filter - Contains another query instance that represents a filter.
-
Filter - Exist
Does not contain any parameter. Only check if the value for
fieldexists. -
Filter - Term
- value - The value for the term to search.
-
Filter - Range
- gt - The value for greater than.
- gte - The value for greater than or equals.
- lt - The value for lower than.
- lte - The value for lower than or equals.
-
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classQuery.Parameterstatic classQuery.Type
-
Constructor Summary
Constructors Constructor Description Query(String field, Query.Type type)Query(Query.Type type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringcollectionToString(Collection<Query> queries, int level)StringgetField()ObjectgetParam(String key)Query.TypegetType()protected Stringindent(int level)QuerysetParam(String key, Object value)StringtoString()StringtoString(int level)
-
-
-
Constructor Detail
-
Query
public Query(Query.Type type)
-
Query
public Query(String field, Query.Type type)
-
-
Method Detail
-
getType
public Query.Type getType()
-
getField
public String getField()
-
toString
public String toString(int level)
-
indent
protected String indent(int level)
-
collectionToString
protected String collectionToString(Collection<Query> queries, int level)
-
-