Class CategoryContextMapping

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

public class CategoryContextMapping
extends ContextMapping<CategoryQueryContext>
A ContextMapping that uses a simple string as a criteria The suggestions are boosted and/or filtered by their associated category (string) value. CategoryQueryContext defines options for constructing a unit of query context for this context type
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    static class  CategoryContextMapping.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 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 CategoryQueryContext fromXContent​(org.elasticsearch.common.xcontent.XContentParser parser)
    Prototype for the query context
    java.lang.String getFieldName()
    Name of the field to get contexts from at index-time
    int hashCode()  
    protected static CategoryContextMapping load​(java.lang.String name, java.util.Map<java.lang.String,​java.lang.Object> config)
    Loads a named CategoryContextMapping instance from a map.
    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<CategoryQueryContext> queryContexts)
    Parse a list of CategoryQueryContext using parser.

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

    name, parseQueryContext, toString, toXContent, type, validateReferences

    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