Class GeoContextMapping

java.lang.Object
org.elasticsearch.search.suggest.completion.context.ContextMapping<GeoQueryContext>
org.elasticsearch.search.suggest.completion.context.GeoContextMapping
All Implemented Interfaces:
org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentFragment

public class GeoContextMapping
extends ContextMapping<GeoQueryContext>
A ContextMapping that uses a geo location/area as a criteria. The suggestions can be boosted and/or filtered depending on whether it falls within an area, represented by a query geo hash with a specified precision GeoQueryContext defines the options for constructing a unit of query context for this context type
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  GeoContextMapping.Builder  

    Nested classes/interfaces inherited from class org.elasticsearch.search.suggest.completion.context.ContextMapping

    ContextMapping.InternalQueryContext, ContextMapping.Type

    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 
    Modifier and Type Field Description
    static int DEFAULT_PRECISION  
    static java.lang.String FIELD_FIELDNAME  
    static java.lang.String FIELD_PRECISION  

    Fields inherited from class org.elasticsearch.search.suggest.completion.context.ContextMapping

    FIELD_NAME, FIELD_TYPE, name, type

    Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent

    EMPTY_PARAMS
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object o)  
    protected GeoQueryContext fromXContent​(org.elasticsearch.common.xcontent.XContentParser parser)
    Prototype for the query context
    java.lang.String getFieldName()  
    int getPrecision()  
    int hashCode()  
    protected static GeoContextMapping load​(java.lang.String name, java.util.Map<java.lang.String,​java.lang.Object> config)  
    java.util.Set<java.lang.String> parseContext​(ParseContext.Document document)
    Retrieves a set of context from a document at index-time.
    java.util.Set<java.lang.String> parseContext​(ParseContext parseContext, org.elasticsearch.common.xcontent.XContentParser parser)
    Parse a set of CharSequence contexts at index-time.
    protected org.elasticsearch.common.xcontent.XContentBuilder toInnerXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
    Implementations should add specific configurations that need to be persisted
    java.util.List<ContextMapping.InternalQueryContext> toInternalQueryContexts​(java.util.List<GeoQueryContext> queryContexts)
    Parse a list of GeoQueryContext using parser.
    protected void validateReferences​(Version indexVersionCreated, java.util.function.Function<java.lang.String,​MappedFieldType> fieldResolver)
    Checks if the current context is consistent with the rest of the fields.

    Methods inherited from class org.elasticsearch.search.suggest.completion.context.ContextMapping

    name, parseQueryContext, toString, toXContent, type, validateContextPaths

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment

    isFragment