Package org.opensearch.index.query
Class GeoPolygonQueryBuilder
java.lang.Object
org.opensearch.index.query.AbstractQueryBuilder<GeoPolygonQueryBuilder>
org.opensearch.index.query.GeoPolygonQueryBuilder
- All Implemented Interfaces:
NamedWriteable
,Writeable
,org.opensearch.common.xcontent.ToXContent
,org.opensearch.common.xcontent.ToXContentObject
,QueryBuilder
,Rewriteable<QueryBuilder>
Query builder for polygon queries
- Opensearch.internal:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opensearch.common.xcontent.ToXContent
org.opensearch.common.xcontent.ToXContent.DelegatingMapParams, org.opensearch.common.xcontent.ToXContent.MapParams, org.opensearch.common.xcontent.ToXContent.Params
Nested classes/interfaces inherited from interface org.opensearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final boolean
The default value for ignore_unmapped.static final String
Fields inherited from class org.opensearch.index.query.AbstractQueryBuilder
boost, BOOST_FIELD, DEFAULT_BOOST, NAME_FIELD, queryName
Fields inherited from interface org.opensearch.index.query.Rewriteable
MAX_REWRITE_ROUNDS
Fields inherited from interface org.opensearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ConstructorsConstructorDescriptionGeoPolygonQueryBuilder
(String fieldName, List<GeoPoint> points) Read from a stream. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
doEquals
(GeoPolygonQueryBuilder other) Indicates whether some otherQueryBuilder
object of the same type is "equal to" this one.protected int
protected org.apache.lucene.search.Query
doToQuery
(QueryShardContext context) protected void
doWriteTo
(StreamOutput out) protected void
doXContent
(org.opensearch.common.xcontent.XContentBuilder builder, org.opensearch.common.xcontent.ToXContent.Params params) static GeoPolygonQueryBuilder
fromXContent
(org.opensearch.common.xcontent.XContentParser parser) Returns the validation method to use for geo coordinates.Returns the name of the writeable objectboolean
Gets whether the query builder will ignore unmapped fields (and run aMatchNoDocsQuery
in place of this query) or throw an exception if the field is unmapped.ignoreUnmapped
(boolean ignoreUnmapped) Sets whether the query builder should ignore unmapped fields (and run aMatchNoDocsQuery
in place of this query) or throw an exception if the field is unmapped.points()
Sets the validation method to use for geo coordinates.Methods inherited from class org.opensearch.index.query.AbstractQueryBuilder
addValidationError, boost, boost, checkNegativeBoost, declareStandardFields, doRewrite, equals, extractInnerHitBuilders, getName, hashCode, parseInnerQueryBuilder, printBoostAndQueryName, queryName, queryName, requireValue, rewrite, throwParsingExceptionOnMultipleFields, toQuery, toString, toXContent, writeTo
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opensearch.common.xcontent.ToXContentObject
isFragment
-
Field Details
-
NAME
- See Also:
-
DEFAULT_IGNORE_UNMAPPED
public static final boolean DEFAULT_IGNORE_UNMAPPEDThe default value for ignore_unmapped.- See Also:
-
-
Constructor Details
-
GeoPolygonQueryBuilder
-
GeoPolygonQueryBuilder
Read from a stream.- Throws:
IOException
-
-
Method Details
-
doWriteTo
- Specified by:
doWriteTo
in classAbstractQueryBuilder<GeoPolygonQueryBuilder>
- Throws:
IOException
-
fieldName
-
points
-
setValidationMethod
Sets the validation method to use for geo coordinates. -
getValidationMethod
Returns the validation method to use for geo coordinates. -
ignoreUnmapped
Sets whether the query builder should ignore unmapped fields (and run aMatchNoDocsQuery
in place of this query) or throw an exception if the field is unmapped. -
ignoreUnmapped
public boolean ignoreUnmapped()Gets whether the query builder will ignore unmapped fields (and run aMatchNoDocsQuery
in place of this query) or throw an exception if the field is unmapped. -
doToQuery
- Specified by:
doToQuery
in classAbstractQueryBuilder<GeoPolygonQueryBuilder>
- Throws:
IOException
-
doXContent
protected void doXContent(org.opensearch.common.xcontent.XContentBuilder builder, org.opensearch.common.xcontent.ToXContent.Params params) throws IOException - Specified by:
doXContent
in classAbstractQueryBuilder<GeoPolygonQueryBuilder>
- Throws:
IOException
-
fromXContent
public static GeoPolygonQueryBuilder fromXContent(org.opensearch.common.xcontent.XContentParser parser) throws IOException - Throws:
IOException
-
doEquals
Description copied from class:AbstractQueryBuilder
Indicates whether some otherQueryBuilder
object of the same type is "equal to" this one.- Specified by:
doEquals
in classAbstractQueryBuilder<GeoPolygonQueryBuilder>
-
doHashCode
protected int doHashCode()- Specified by:
doHashCode
in classAbstractQueryBuilder<GeoPolygonQueryBuilder>
-
getWriteableName
Description copied from interface:NamedWriteable
Returns the name of the writeable object
-