public class GeoDistanceRangeQueryBuilder extends AbstractQueryBuilder<GeoDistanceRangeQueryBuilder>
Writeable.Reader<R>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
static GeoDistance |
DEFAULT_GEO_DISTANCE |
static boolean |
DEFAULT_IGNORE_UNMAPPED
The default value for ignore_unmapped.
|
static boolean |
DEFAULT_INCLUDE_LOWER |
static boolean |
DEFAULT_INCLUDE_UPPER |
static java.lang.String |
DEFAULT_OPTIMIZE_BBOX |
static DistanceUnit |
DEFAULT_UNIT |
static java.lang.String |
NAME |
static ParseField |
QUERY_NAME_FIELD |
boost, DEFAULT_BOOST, queryName
EMPTY_PARAMS
Constructor and Description |
---|
GeoDistanceRangeQueryBuilder(StreamInput in)
Read from a stream.
|
GeoDistanceRangeQueryBuilder(java.lang.String fieldName,
double lat,
double lon) |
GeoDistanceRangeQueryBuilder(java.lang.String fieldName,
GeoPoint point) |
GeoDistanceRangeQueryBuilder(java.lang.String fieldName,
java.lang.String geohash) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
doEquals(GeoDistanceRangeQueryBuilder other)
Indicates whether some other
QueryBuilder object of the same type is "equal to" this one. |
protected int |
doHashCode() |
protected org.apache.lucene.search.Query |
doToQuery(QueryShardContext context) |
protected void |
doWriteTo(StreamOutput out) |
protected void |
doXContent(XContentBuilder builder,
ToXContent.Params params) |
java.lang.String |
fieldName() |
java.lang.Object |
from() |
GeoDistanceRangeQueryBuilder |
from(java.lang.Number from) |
GeoDistanceRangeQueryBuilder |
from(java.lang.String from) |
static GeoDistanceRangeQueryBuilder |
fromXContent(QueryParseContext parseContext) |
GeoDistance |
geoDistance() |
GeoDistanceRangeQueryBuilder |
geoDistance(GeoDistance geoDistance) |
GeoValidationMethod |
getValidationMethod()
Returns validation method for coordinates.
|
java.lang.String |
getWriteableName()
Returns the name of the writeable object
|
boolean |
ignoreUnmapped()
Gets whether the query builder will ignore unmapped fields (and run a
MatchNoDocsQuery in place of this query) or throw an exception if
the field is unmapped. |
GeoDistanceRangeQueryBuilder |
ignoreUnmapped(boolean ignoreUnmapped)
Sets whether the query builder should ignore unmapped fields (and run a
MatchNoDocsQuery in place of this query) or throw an exception if
the field is unmapped. |
boolean |
includeLower() |
GeoDistanceRangeQueryBuilder |
includeLower(boolean includeLower) |
boolean |
includeUpper() |
GeoDistanceRangeQueryBuilder |
includeUpper(boolean includeUpper) |
java.lang.String |
optimizeBbox() |
GeoDistanceRangeQueryBuilder |
optimizeBbox(java.lang.String optimizeBbox) |
GeoPoint |
point() |
GeoDistanceRangeQueryBuilder |
setValidationMethod(GeoValidationMethod method)
Set validation method for coordinates.
|
java.lang.Object |
to() |
GeoDistanceRangeQueryBuilder |
to(java.lang.Number to) |
GeoDistanceRangeQueryBuilder |
to(java.lang.String to) |
DistanceUnit |
unit() |
GeoDistanceRangeQueryBuilder |
unit(DistanceUnit unit) |
addValidationError, boost, boost, convertToBytesRefIfString, convertToStringIfBytesRef, doRewrite, equals, getName, hashCode, printBoostAndQueryName, queryName, queryName, readQueries, requireValue, rewrite, toFilter, toQueries, toQuery, toXContent, writeQueries, writeTo
buildAsBytes, buildAsBytes, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
rewriteQuery
public static final java.lang.String NAME
public static final ParseField QUERY_NAME_FIELD
public static final boolean DEFAULT_INCLUDE_LOWER
public static final boolean DEFAULT_INCLUDE_UPPER
public static final GeoDistance DEFAULT_GEO_DISTANCE
public static final DistanceUnit DEFAULT_UNIT
public static final java.lang.String DEFAULT_OPTIMIZE_BBOX
public static final boolean DEFAULT_IGNORE_UNMAPPED
public GeoDistanceRangeQueryBuilder(java.lang.String fieldName, GeoPoint point)
public GeoDistanceRangeQueryBuilder(java.lang.String fieldName, double lat, double lon)
public GeoDistanceRangeQueryBuilder(java.lang.String fieldName, java.lang.String geohash)
public GeoDistanceRangeQueryBuilder(StreamInput in) throws java.io.IOException
java.io.IOException
protected void doWriteTo(StreamOutput out) throws java.io.IOException
doWriteTo
in class AbstractQueryBuilder<GeoDistanceRangeQueryBuilder>
java.io.IOException
public java.lang.String fieldName()
public GeoPoint point()
public GeoDistanceRangeQueryBuilder from(java.lang.String from)
public GeoDistanceRangeQueryBuilder from(java.lang.Number from)
public java.lang.Object from()
public GeoDistanceRangeQueryBuilder to(java.lang.String to)
public GeoDistanceRangeQueryBuilder to(java.lang.Number to)
public java.lang.Object to()
public GeoDistanceRangeQueryBuilder includeLower(boolean includeLower)
public boolean includeLower()
public GeoDistanceRangeQueryBuilder includeUpper(boolean includeUpper)
public boolean includeUpper()
public GeoDistanceRangeQueryBuilder geoDistance(GeoDistance geoDistance)
public GeoDistance geoDistance()
public GeoDistanceRangeQueryBuilder unit(DistanceUnit unit)
public DistanceUnit unit()
public GeoDistanceRangeQueryBuilder optimizeBbox(java.lang.String optimizeBbox)
public java.lang.String optimizeBbox()
public GeoDistanceRangeQueryBuilder setValidationMethod(GeoValidationMethod method)
public GeoValidationMethod getValidationMethod()
public GeoDistanceRangeQueryBuilder ignoreUnmapped(boolean ignoreUnmapped)
MatchNoDocsQuery
in place of this query) or throw an exception if
the field is unmapped.public boolean ignoreUnmapped()
MatchNoDocsQuery
in place of this query) or throw an exception if
the field is unmapped.protected org.apache.lucene.search.Query doToQuery(QueryShardContext context) throws java.io.IOException
doToQuery
in class AbstractQueryBuilder<GeoDistanceRangeQueryBuilder>
java.io.IOException
protected void doXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
doXContent
in class AbstractQueryBuilder<GeoDistanceRangeQueryBuilder>
java.io.IOException
public static GeoDistanceRangeQueryBuilder fromXContent(QueryParseContext parseContext) throws java.io.IOException
java.io.IOException
protected boolean doEquals(GeoDistanceRangeQueryBuilder other)
AbstractQueryBuilder
QueryBuilder
object of the same type is "equal to" this one.doEquals
in class AbstractQueryBuilder<GeoDistanceRangeQueryBuilder>
protected int doHashCode()
doHashCode
in class AbstractQueryBuilder<GeoDistanceRangeQueryBuilder>
public java.lang.String getWriteableName()
NamedWriteable