public final class ElasticsearchQueryHelper
extends java.lang.Object| Modifier and Type | Method and Description |
|---|---|
static void | boolAddFilter(io.vertx.core.json.JsonObject bool, io.vertx.core.json.JsonObject filter)Add a filter to a bool query. |
static void | boolAddMust(io.vertx.core.json.JsonObject bool, io.vertx.core.json.JsonObject must)Add a "must" clause to a bool query. |
static void | boolAddMustNot(io.vertx.core.json.JsonObject bool, io.vertx.core.json.JsonObject mustNot)Add a "must_not" clause to a bool query. |
static void | boolAddShould(io.vertx.core.json.JsonObject bool, io.vertx.core.json.JsonObject should)Add a "should" clause to a bool query. |
static io.vertx.core.json.JsonObject | boolQuery()Create a query that allows for boolean combinations of other queries |
static io.vertx.core.json.JsonObject | boolQuery(int minimumShouldMatch)Create a query that allows for boolean combinations of other queries |
static io.vertx.core.json.JsonObject | existsQuery(java.lang.String name)Create a query that looks if a field with the given name exists |
static io.vertx.core.json.JsonObject | geoShapeQuery(java.lang.String name, io.vertx.core.json.JsonObject shape, java.lang.String relation)Create a query that looks for documents matching a geo shape |
static io.vertx.core.json.JsonObject | gteQuery(java.lang.String name, java.lang.Object value)Create a term query to compare a field to a value using greater than or equal to as operator. |
static io.vertx.core.json.JsonObject | gtQuery(java.lang.String name, java.lang.Object value)Create a term query to compare a field to a value using greater than as operator. |
static io.vertx.core.json.JsonObject | lteQuery(java.lang.String name, java.lang.Object value)Create a term query to compare a field to a value using less than or equal to as operator. |
static io.vertx.core.json.JsonObject | ltQuery(java.lang.String name, java.lang.Object value)Create a term query to compare a field to a value using less than as operator. |
static io.vertx.core.json.JsonObject | matchAllQuery()Create a query that matches all documents |
static io.vertx.core.json.JsonObject | multiMatchQuery(java.lang.Object text, java.lang.String... fieldNames)Create a query that compares a value to multiple fields |
static io.vertx.core.json.JsonObject | prefixQuery(java.lang.String name, java.lang.Object prefix)Create a query that looks for a field starting with a given prefix |
static io.vertx.core.json.JsonObject | shape(java.lang.String type, io.vertx.core.json.JsonArray coordinates)Create a geo shape |
static io.vertx.core.json.JsonObject | termQuery(java.lang.String name, java.lang.Object value)Create a term query to exactly compare a field to a value |
public static io.vertx.core.json.JsonObject boolQuery()
public static io.vertx.core.json.JsonObject boolQuery(int minimumShouldMatch)
minimumShouldMatch - the minimum number of should clauses to matchpublic static void boolAddFilter(io.vertx.core.json.JsonObject bool,
io.vertx.core.json.JsonObject filter)bool - the bool queryfilter - the filter to addpublic static void boolAddMust(io.vertx.core.json.JsonObject bool,
io.vertx.core.json.JsonObject must)bool - the bool querymust - the clause to addpublic static void boolAddMustNot(io.vertx.core.json.JsonObject bool,
io.vertx.core.json.JsonObject mustNot)bool - the bool querymustNot - the clause to addpublic static void boolAddShould(io.vertx.core.json.JsonObject bool,
io.vertx.core.json.JsonObject should)bool - the bool queryshould - the clause to addpublic static io.vertx.core.json.JsonObject termQuery(java.lang.String name,
java.lang.Object value)name - the field's namevalue - the value to compare topublic static io.vertx.core.json.JsonObject ltQuery(java.lang.String name,
java.lang.Object value)name - the field's namevalue - the value to compare topublic static io.vertx.core.json.JsonObject lteQuery(java.lang.String name,
java.lang.Object value)name - the field's namevalue - the value to compare topublic static io.vertx.core.json.JsonObject gtQuery(java.lang.String name,
java.lang.Object value)name - the field's namevalue - the value to compare topublic static io.vertx.core.json.JsonObject gteQuery(java.lang.String name,
java.lang.Object value)name - the field's namevalue - the value to compare topublic static io.vertx.core.json.JsonObject matchAllQuery()
public static io.vertx.core.json.JsonObject multiMatchQuery(java.lang.Object text,
java.lang.String... fieldNames)text - the valuefieldNames - the names of the fields to compare topublic static io.vertx.core.json.JsonObject existsQuery(java.lang.String name)
name - the field's namepublic static io.vertx.core.json.JsonObject prefixQuery(java.lang.String name,
java.lang.Object prefix)name - the field's nameprefix - the prefixpublic static io.vertx.core.json.JsonObject geoShapeQuery(java.lang.String name,
io.vertx.core.json.JsonObject shape,
java.lang.String relation)name - the field name containing the document's geo shapeshape - the geo shape to compare torelation - the relation used for comparison (i.e. "intersects", "disjoint", "within", "contains")public static io.vertx.core.json.JsonObject shape(java.lang.String type,
io.vertx.core.json.JsonArray coordinates)type - the shape's type (e.g. "envelope")coordinates - the shape's coordinates