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
Fields inherited from class org.elasticsearch.index.mapper.AbstractScriptFieldType
DEFAULT_SCRIPT, script
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.search.Query
distanceFeatureQuery
(Object origin, String pivot, SearchExecutionContext context) org.apache.lucene.search.Query
existsQuery
(SearchExecutionContext context) fielddataBuilder
(FieldDataContext fieldDataContext) Return a fielddata builder for this fieldorg.apache.lucene.search.Query
geoShapeQuery
(SearchExecutionContext context, String fieldName, ShapeRelation relation, org.apache.lucene.geo.LatLonGeometry... geometries) protected org.apache.lucene.search.Query
rangeQuery
(Object lowerTerm, Object upperTerm, boolean includeLower, boolean includeUpper, ZoneId timeZone, DateMathParser parser, SearchExecutionContext context) org.apache.lucene.search.Query
termQuery
(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, wildcardQuery
Methods inherited from class org.elasticsearch.index.mapper.MappedFieldType
blockLoader, checkNoFormat, checkNoTimeZone, collapseType, dimensions, docValueFormat, eagerGlobalOrdinals, extractTerm, failIfNoDocValues, failIfNotIndexed, failIfNotIndexedNorDocValuesFallback, familyTypeName, fuzzyIntervals, fuzzyQuery, getMetricType, getTerms, getTextSearchInfo, hasDocValues, isDimension, isFieldWithinQuery, isIndexed, isStored, mayExistInIndex, meta, name, normalizedWildcardQuery, pointReaderIfPossible, prefixIntervals, prefixQuery, termIntervals, termQueryCaseInsensitive, termsQuery, valueForDisplay, wildcardIntervals, wildcardQuery
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.index.mapper.GeoShapeQueryable
geoShapeQuery, geoShapeQuery
-
Field Details
-
PARSER
-
-
Method Details
-
typeName
Description copied from class:MappedFieldType
Returns the name of this type, as would be specified in mapping properties- Specified by:
typeName
in 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:
rangeQuery
in classAbstractScriptFieldType<GeoPointFieldScript.LeafFactory>
-
termQuery
Description copied from class:MappedFieldType
Generates a query that will only match documents that contain the given value. The default implementation returns aTermQuery
over the value bytes- Specified by:
termQuery
in classMappedFieldType
-
fielddataBuilder
Description copied from class:MappedFieldType
Return a fielddata builder for this field- Overrides:
fielddataBuilder
in classMappedFieldType
- Parameters:
fieldDataContext
- the context for the fielddata
-
existsQuery
- Overrides:
existsQuery
in classMappedFieldType
-
geoShapeQuery
public org.apache.lucene.search.Query geoShapeQuery(SearchExecutionContext context, String fieldName, ShapeRelation relation, org.apache.lucene.geo.LatLonGeometry... geometries) - Specified by:
geoShapeQuery
in interfaceGeoShapeQueryable
-
distanceFeatureQuery
public org.apache.lucene.search.Query distanceFeatureQuery(Object origin, String pivot, SearchExecutionContext context) - Overrides:
distanceFeatureQuery
in 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:MappedFieldType
Create 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 throwUnsupportedOperationException
since this could cause a search retrieving multiple fields (like "fields": ["*"]) to fail.- Overrides:
valueFetcher
in classAbstractScriptFieldType<GeoPointFieldScript.LeafFactory>
-