Module org.elasticsearch.server
Package org.elasticsearch.index.mapper
Class GeoPointScriptFieldType
java.lang.Object
org.elasticsearch.index.mapper.MappedFieldType
org.elasticsearch.index.mapper.AbstractScriptFieldType<GeoPointFieldScript.LeafFactory>
org.elasticsearch.index.mapper.GeoPointScriptFieldType
- All Implemented Interfaces:
GeoShapeQueryable
public final class GeoPointScriptFieldType
extends AbstractScriptFieldType<GeoPointFieldScript.LeafFactory>
implements GeoShapeQueryable
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.AbstractScriptFieldType
AbstractScriptFieldType.Builder<Factory>Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.MappedFieldType
MappedFieldType.BlockLoaderContext, MappedFieldType.CollapseType, MappedFieldType.FielddataOperation, MappedFieldType.FieldExtractPreference, MappedFieldType.Relation -
Field Summary
FieldsFields inherited from class org.elasticsearch.index.mapper.AbstractScriptFieldType
DEFAULT_SCRIPT, script -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.search.QuerydistanceFeatureQuery(Object origin, String pivot, SearchExecutionContext context) org.apache.lucene.search.QueryexistsQuery(SearchExecutionContext context) fielddataBuilder(FieldDataContext fieldDataContext) Return a fielddata builder for this fieldorg.apache.lucene.search.QuerygeoShapeQuery(SearchExecutionContext context, String fieldName, ShapeRelation relation, org.apache.lucene.geo.LatLonGeometry... geometries) protected org.apache.lucene.search.QueryrangeQuery(Object lowerTerm, Object upperTerm, boolean includeLower, boolean includeUpper, ZoneId timeZone, DateMathParser parser, SearchExecutionContext context) org.apache.lucene.search.QuerytermQuery(Object value, SearchExecutionContext context) Generates a query that will only match documents that contain the given value.typeName()Returns the name of this type, as would be specified in mapping propertiesvalueFetcher(SearchExecutionContext context, String format) Create a helper class to fetch field values during theFetchFieldsPhase.static Function<org.apache.lucene.index.LeafReaderContext, AbstractLongFieldScript> valuesEncodedAsLong(SearchLookup lookup, String name, Function<org.apache.lucene.index.LeafReaderContext, GeoPointFieldScript> delegateLeafFactory) Methods inherited from class org.elasticsearch.index.mapper.AbstractScriptFieldType
applyScriptContext, fieldHasValue, fuzzyQuery, isAggregatable, isSearchable, leafFactory, leafFactory, multiPhraseQuery, phrasePrefixQuery, phraseQuery, prefixQuery, rangeQuery, regexpQuery, spanPrefixQuery, validateMatchedRoutingPath, wildcardQueryMethods inherited from class org.elasticsearch.index.mapper.MappedFieldType
automatonQuery, blockLoader, checkNoFormat, checkNoTimeZone, collapseType, dimensions, docValueFormat, eagerGlobalOrdinals, extractTerm, failIfNoDocValues, failIfNotIndexed, failIfNotIndexedNorDocValuesFallback, familyTypeName, fuzzyIntervals, fuzzyQuery, getDefaultHighlighter, getMetricType, getTerms, getTextSearchInfo, hasDocValues, hasScriptValues, isDimension, isFieldWithinQuery, isIndexed, isStored, isVectorEmbedding, mayExistInIndex, meta, name, normalizedWildcardQuery, pointReaderIfPossible, prefixIntervals, prefixQuery, rangeIntervals, regexpIntervals, termIntervals, termQueryCaseInsensitive, termsQuery, valueForDisplay, wildcardIntervals, wildcardLikeQuery, wildcardQueryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.index.mapper.GeoShapeQueryable
geoShapeQuery, geoShapeQuery
-
Field Details
-
PARSER
-
-
Method Details
-
typeName
Description copied from class:MappedFieldTypeReturns the name of this type, as would be specified in mapping properties- Specified by:
typeNamein classMappedFieldType
-
rangeQuery
protected org.apache.lucene.search.Query rangeQuery(Object lowerTerm, Object upperTerm, boolean includeLower, boolean includeUpper, ZoneId timeZone, DateMathParser parser, SearchExecutionContext context) - Specified by:
rangeQueryin classAbstractScriptFieldType<GeoPointFieldScript.LeafFactory>
-
termQuery
Description copied from class:MappedFieldTypeGenerates a query that will only match documents that contain the given value. The default implementation returns aTermQueryover the value bytes- Specified by:
termQueryin classMappedFieldType
-
fielddataBuilder
Description copied from class:MappedFieldTypeReturn a fielddata builder for this field- Overrides:
fielddataBuilderin classMappedFieldType- Parameters:
fieldDataContext- the context for the fielddata
-
existsQuery
- Overrides:
existsQueryin classMappedFieldType
-
geoShapeQuery
public org.apache.lucene.search.Query geoShapeQuery(SearchExecutionContext context, String fieldName, ShapeRelation relation, org.apache.lucene.geo.LatLonGeometry... geometries) - Specified by:
geoShapeQueryin interfaceGeoShapeQueryable
-
distanceFeatureQuery
public org.apache.lucene.search.Query distanceFeatureQuery(Object origin, String pivot, SearchExecutionContext context) - Overrides:
distanceFeatureQueryin classMappedFieldType
-
valuesEncodedAsLong
public static Function<org.apache.lucene.index.LeafReaderContext,AbstractLongFieldScript> valuesEncodedAsLong(SearchLookup lookup, String name, Function<org.apache.lucene.index.LeafReaderContext, GeoPointFieldScript> delegateLeafFactory) -
valueFetcher
Description copied from class:MappedFieldTypeCreate a helper class to fetch field values during theFetchFieldsPhase. New field types must implement this method in order to support the search 'fields' option. Except for metadata fields, field types should not throwUnsupportedOperationExceptionsince this could cause a search retrieving multiple fields (like "fields": ["*"]) to fail.- Overrides:
valueFetcherin classAbstractScriptFieldType<GeoPointFieldScript.LeafFactory>
-