public class GeoPolygonQueryBuilder extends AbstractQueryBuilder<GeoPolygonQueryBuilder>
Writeable.Reader<R>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_IGNORE_UNMAPPED
The default value for ignore_unmapped.
|
static java.lang.String |
NAME |
static ParseField |
QUERY_NAME_FIELD |
boost, BOOST_FIELD, DEFAULT_BOOST, NAME_FIELD, queryName
EMPTY_PARAMS
Constructor and Description |
---|
GeoPolygonQueryBuilder(StreamInput in)
Read from a stream.
|
GeoPolygonQueryBuilder(java.lang.String fieldName,
java.util.List<GeoPoint> points) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
doEquals(GeoPolygonQueryBuilder 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() |
static GeoPolygonQueryBuilder |
fromXContent(QueryParseContext parseContext) |
GeoValidationMethod |
getValidationMethod()
Returns the validation method to use for geo 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. |
GeoPolygonQueryBuilder |
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. |
java.util.List<GeoPoint> |
points() |
GeoPolygonQueryBuilder |
setValidationMethod(GeoValidationMethod method)
Sets the validation method to use for geo coordinates.
|
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_IGNORE_UNMAPPED
public GeoPolygonQueryBuilder(java.lang.String fieldName, java.util.List<GeoPoint> points)
public GeoPolygonQueryBuilder(StreamInput in) throws java.io.IOException
java.io.IOException
protected void doWriteTo(StreamOutput out) throws java.io.IOException
doWriteTo
in class AbstractQueryBuilder<GeoPolygonQueryBuilder>
java.io.IOException
public java.lang.String fieldName()
public java.util.List<GeoPoint> points()
public GeoPolygonQueryBuilder setValidationMethod(GeoValidationMethod method)
public GeoValidationMethod getValidationMethod()
public GeoPolygonQueryBuilder 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<GeoPolygonQueryBuilder>
java.io.IOException
protected void doXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
doXContent
in class AbstractQueryBuilder<GeoPolygonQueryBuilder>
java.io.IOException
public static GeoPolygonQueryBuilder fromXContent(QueryParseContext parseContext) throws java.io.IOException
java.io.IOException
protected boolean doEquals(GeoPolygonQueryBuilder other)
AbstractQueryBuilder
QueryBuilder
object of the same type is "equal to" this one.doEquals
in class AbstractQueryBuilder<GeoPolygonQueryBuilder>
protected int doHashCode()
doHashCode
in class AbstractQueryBuilder<GeoPolygonQueryBuilder>
public java.lang.String getWriteableName()
NamedWriteable