Package org.elasticsearch.index.mapper
Class GeoPointScriptFieldType
org.elasticsearch.index.mapper.MappedFieldType
org.elasticsearch.index.mapper.GeoPointScriptFieldType
- All Implemented Interfaces:
org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentFragment
,GeoShapeQueryable
,RuntimeField
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.MappedFieldType
MappedFieldType.CollapseType, MappedFieldType.Relation
Nested classes/interfaces inherited from interface org.elasticsearch.index.mapper.RuntimeField
RuntimeField.Parser
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
-
Field Summary
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Method Summary
Modifier and TypeMethodDescriptionExposes theMappedFieldType
s backing this runtime field, used to execute queries, run aggs etc.protected void
org.apache.lucene.search.Query
origin, pivot, SearchExecutionContext context)
void
doXContentBody(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
Prints out the parameters that subclasses exposeorg.apache.lucene.search.Query
existsQuery(SearchExecutionContext context)
fullyQualifiedIndexName, <SearchLookup> searchLookup)
Return a fielddata builder for this fieldorg.apache.lucene.search.Query
value, Fuzziness fuzziness, int prefixLength, int maxExpansions, boolean transpositions, SearchExecutionContext context)
org.apache.lucene.search.Query
geoShapeQuery(org.elasticsearch.geometry.Geometry shape, fieldName, ShapeRelation relation, SearchExecutionContext context)
boolean
Returns true if the field is aggregatable.boolean
Returns true if the field is searchable.protected GeoPointFieldScript.LeafFactory
leafFactory(SearchExecutionContext context)
Create a script leaf factory for queries.protected GeoPointFieldScript.LeafFactory
leafFactory(SearchLookup searchLookup)
Create a script leaf factory.org.apache.lucene.search.Query
multiPhraseQuery(org.apache.lucene.analysis.TokenStream stream, int slop, boolean enablePositionIncrements, SearchExecutionContext context)
org.apache.lucene.search.Query
phrasePrefixQuery(org.apache.lucene.analysis.TokenStream stream, int slop, int maxExpansions, SearchExecutionContext context)
org.apache.lucene.search.Query
phraseQuery(org.apache.lucene.analysis.TokenStream stream, int slop, boolean enablePositionIncrements, SearchExecutionContext context)
org.apache.lucene.search.Query
value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, boolean caseInsensitive, SearchExecutionContext context)
protected org.apache.lucene.search.Query
lowerTerm, upperTerm, boolean includeLower, boolean includeUpper, timeZone, DateMathParser parser, SearchExecutionContext context)
org.apache.lucene.search.Query
lowerTerm, upperTerm, boolean includeLower, boolean includeUpper, ShapeRelation relation, timeZone, DateMathParser parser, SearchExecutionContext context)
Factory method for range queries.org.apache.lucene.search.Query
value, int syntaxFlags, int matchFlags, int maxDeterminizedStates, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, SearchExecutionContext context)
org.apache.lucene.search.spans.SpanQuery
value, org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.SpanRewriteMethod method, SearchExecutionContext context)
org.apache.lucene.search.Query
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, format)
Create a helper class to fetch field values during theFetchFieldsPhase
.org.apache.lucene.search.Query
value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, boolean caseInsensitive, SearchExecutionContext context)
Methods inherited from class org.elasticsearch.index.mapper.MappedFieldType
boost, collapseType, docValueFormat, eagerGlobalOrdinals, extractTerm, failIfNoDocValues, failIfNotIndexed, familyTypeName, fuzzyIntervals, getTerms, getTextSearchInfo, hasDocValues, isFieldWithinQuery, isStored, meta, name, normalizedWildcardQuery, pointReaderIfPossible, prefixIntervals, prefixQuery, setBoost, termIntervals, termQueryCaseInsensitive, termsQuery, valueForDisplay, wildcardIntervals, wildcardQuery
Methods inherited from class java.lang.
, , , , , , , , , ,
Methods inherited from interface org.elasticsearch.index.mapper.GeoShapeQueryable
geoShapeQuery
Methods inherited from interface org.elasticsearch.index.mapper.RuntimeField
name, toXContent
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
Field Details
-
PARSER
-
script
-
-
Method Details
-
typeName
public typeName()Description copied from class:MappedFieldType
Returns the name of this type, as would be specified in mapping properties- Specified by:
typeName
in interfaceRuntimeField
- Specified by:
typeName
in classMappedFieldType
- Returns:
- type of the field
-
rangeQuery
protected org.apache.lucene.search.Query rangeQuery( lowerTerm, upperTerm, boolean includeLower, boolean includeUpper, timeZone, DateMathParser parser, SearchExecutionContext context) -
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, boosted byMappedFieldType.boost()
.- Specified by:
termQuery
in classMappedFieldType
-
fielddataBuilder
public fullyQualifiedIndexName, <SearchLookup> searchLookup)Description copied from class:MappedFieldType
Return a fielddata builder for this field- Overrides:
fielddataBuilder
in classMappedFieldType
- Parameters:
fullyQualifiedIndexName
- the name of the index this field-data is build forsearchLookup
- aSearchLookup
supplier to allow for accessing other fields values in the context of runtime fields
-
existsQuery
- Overrides:
existsQuery
in classMappedFieldType
-
geoShapeQuery
public org.apache.lucene.search.Query geoShapeQuery(org.elasticsearch.geometry.Geometry shape, fieldName, ShapeRelation relation, SearchExecutionContext context)- Specified by:
geoShapeQuery
in interfaceGeoShapeQueryable
-
distanceFeatureQuery
public org.apache.lucene.search.Query distanceFeatureQuery( origin, pivot, SearchExecutionContext context)- Overrides:
distanceFeatureQuery
in classMappedFieldType
-
asMappedFieldTypes
Description copied from interface:RuntimeField
Exposes theMappedFieldType
s backing this runtime field, used to execute queries, run aggs etc.- Specified by:
asMappedFieldTypes
in interfaceRuntimeField
- Returns:
- the
MappedFieldType
s backing this runtime field
-
doXContentBody
public final void doXContentBody(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throwsDescription copied from interface:RuntimeField
Prints out the parameters that subclasses expose- Specified by:
doXContentBody
in interfaceRuntimeField
- Throws:
-
isSearchable
public final boolean isSearchable()Description copied from class:MappedFieldType
Returns true if the field is searchable.- Overrides:
isSearchable
in classMappedFieldType
-
isAggregatable
public final boolean isAggregatable()Description copied from class:MappedFieldType
Returns true if the field is aggregatable.- Overrides:
isAggregatable
in classMappedFieldType
-
rangeQuery
public final org.apache.lucene.search.Query rangeQuery( lowerTerm, upperTerm, boolean includeLower, boolean includeUpper, ShapeRelation relation, timeZone, DateMathParser parser, SearchExecutionContext context)Description copied from class:MappedFieldType
Factory method for range queries.- Overrides:
rangeQuery
in classMappedFieldType
relation
- the relation, nulls should be interpreted like INTERSECTS
-
fuzzyQuery
public org.apache.lucene.search.Query fuzzyQuery( value, Fuzziness fuzziness, int prefixLength, int maxExpansions, boolean transpositions, SearchExecutionContext context)- Overrides:
fuzzyQuery
in classMappedFieldType
-
prefixQuery
public org.apache.lucene.search.Query prefixQuery( value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, boolean caseInsensitive, SearchExecutionContext context)- Overrides:
prefixQuery
in classMappedFieldType
-
wildcardQuery
public org.apache.lucene.search.Query wildcardQuery( value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, boolean caseInsensitive, SearchExecutionContext context)- Overrides:
wildcardQuery
in classMappedFieldType
-
regexpQuery
public org.apache.lucene.search.Query regexpQuery( value, int syntaxFlags, int matchFlags, int maxDeterminizedStates, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, SearchExecutionContext context)- Overrides:
regexpQuery
in classMappedFieldType
-
phraseQuery
public org.apache.lucene.search.Query phraseQuery(org.apache.lucene.analysis.TokenStream stream, int slop, boolean enablePositionIncrements, SearchExecutionContext context)- Overrides:
phraseQuery
in classMappedFieldType
-
multiPhraseQuery
public org.apache.lucene.search.Query multiPhraseQuery(org.apache.lucene.analysis.TokenStream stream, int slop, boolean enablePositionIncrements, SearchExecutionContext context)- Overrides:
multiPhraseQuery
in classMappedFieldType
-
phrasePrefixQuery
public org.apache.lucene.search.Query phrasePrefixQuery(org.apache.lucene.analysis.TokenStream stream, int slop, int maxExpansions, SearchExecutionContext context)- Overrides:
phrasePrefixQuery
in classMappedFieldType
-
spanPrefixQuery
public org.apache.lucene.search.spans.SpanQuery spanPrefixQuery( value, org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.SpanRewriteMethod method, SearchExecutionContext context)- Overrides:
spanPrefixQuery
in classMappedFieldType
-
checkAllowExpensiveQueries
-
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 throw since this could cause a search retrieving multiple fields (like "fields": ["*"]) to fail.
- Specified by:
valueFetcher
in classMappedFieldType
-
leafFactory
Create a script leaf factory. -
leafFactory
Create a script leaf factory for queries.
-