org.elasticsearch.index.mapper.xcontent
Class RoutingFieldMapper

java.lang.Object
  extended by org.elasticsearch.index.mapper.xcontent.AbstractFieldMapper<java.lang.String>
      extended by org.elasticsearch.index.mapper.xcontent.RoutingFieldMapper
All Implemented Interfaces:
ToXContent, FieldMapper<java.lang.String>, InternalMapper, RoutingFieldMapper, XContentMapper

public class RoutingFieldMapper
extends AbstractFieldMapper<java.lang.String>
implements RoutingFieldMapper


Nested Class Summary
static class RoutingFieldMapper.Builder
           
static class RoutingFieldMapper.Defaults
           
 
Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.xcontent.AbstractFieldMapper
AbstractFieldMapper.OpenBuilder<T extends AbstractFieldMapper.Builder,Y extends AbstractFieldMapper>
 
Nested classes/interfaces inherited from interface org.elasticsearch.index.mapper.FieldMapper
FieldMapper.Names
 
Nested classes/interfaces inherited from interface org.elasticsearch.index.mapper.xcontent.XContentMapper
XContentMapper.BuilderContext, XContentMapper.TypeParser
 
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.MapParams, ToXContent.Params
 
Field Summary
static java.lang.String CONTENT_TYPE
           
 
Fields inherited from class org.elasticsearch.index.mapper.xcontent.AbstractFieldMapper
boost, index, indexAnalyzer, names, omitNorms, omitTermFreqAndPositions, searchAnalyzer, store, termVector
 
Fields inherited from interface org.elasticsearch.index.mapper.xcontent.XContentMapper
EMPTY_ARRAY
 
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
 
Constructor Summary
protected RoutingFieldMapper()
           
protected RoutingFieldMapper(org.apache.lucene.document.Field.Store store, org.apache.lucene.document.Field.Index index, boolean required, java.lang.String path)
           
 
Method Summary
protected  java.lang.String contentType()
           
 java.lang.String indexedValue(java.lang.String value)
          Returns the indexed value.
 void merge(XContentMapper mergeWith, MergeContext mergeContext)
           
protected  org.apache.lucene.document.Field parseCreateField(ParseContext context)
           
 java.lang.String path()
           
 boolean required()
           
 void toXContent(XContentBuilder builder, ToXContent.Params params)
           
 void validate(ParseContext context, java.lang.String routing)
           
 java.lang.String value(org.apache.lucene.document.Document document)
           
 java.lang.String value(org.apache.lucene.document.Fieldable field)
          Returns the actual value of the field.
 java.lang.String valueAsString(org.apache.lucene.document.Fieldable field)
          Returns the actual value of the field as string.
 java.lang.String valueFromString(java.lang.String value)
           
 
Methods inherited from class org.elasticsearch.index.mapper.xcontent.AbstractFieldMapper
analyzed, boost, doXContentBody, fieldDataType, fieldFilter, fieldQuery, index, indexAnalyzer, indexed, name, names, omitNorms, omitTermFreqAndPositions, parse, queryStringTermQuery, rangeFilter, rangeQuery, searchAnalyzer, store, stored, termVector, traverse, useFieldQueryWithQueryString, valueForSearch
 
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.FieldMapper
analyzed, boost, fieldDataType, fieldFilter, fieldQuery, index, indexAnalyzer, indexed, names, omitNorms, omitTermFreqAndPositions, queryStringTermQuery, rangeFilter, rangeQuery, searchAnalyzer, store, stored, termVector, useFieldQueryWithQueryString, valueForSearch
 

Field Detail

CONTENT_TYPE

public static final java.lang.String CONTENT_TYPE
See Also:
Constant Field Values
Constructor Detail

RoutingFieldMapper

protected RoutingFieldMapper()

RoutingFieldMapper

protected RoutingFieldMapper(org.apache.lucene.document.Field.Store store,
                             org.apache.lucene.document.Field.Index index,
                             boolean required,
                             java.lang.String path)
Method Detail

required

public boolean required()
Specified by:
required in interface RoutingFieldMapper

path

public java.lang.String path()
Specified by:
path in interface RoutingFieldMapper

value

public java.lang.String value(org.apache.lucene.document.Document document)
Specified by:
value in interface RoutingFieldMapper

value

public java.lang.String value(org.apache.lucene.document.Fieldable field)
Description copied from interface: FieldMapper
Returns the actual value of the field.

Specified by:
value in interface FieldMapper<java.lang.String>

valueFromString

public java.lang.String valueFromString(java.lang.String value)
Specified by:
valueFromString in interface FieldMapper<java.lang.String>

valueAsString

public java.lang.String valueAsString(org.apache.lucene.document.Fieldable field)
Description copied from interface: FieldMapper
Returns the actual value of the field as string.

Specified by:
valueAsString in interface FieldMapper<java.lang.String>

indexedValue

public java.lang.String indexedValue(java.lang.String value)
Description copied from interface: FieldMapper
Returns the indexed value.

Specified by:
indexedValue in interface FieldMapper<java.lang.String>
Overrides:
indexedValue in class AbstractFieldMapper<java.lang.String>

validate

public void validate(ParseContext context,
                     java.lang.String routing)
              throws MapperParsingException
Throws:
MapperParsingException

parseCreateField

protected org.apache.lucene.document.Field parseCreateField(ParseContext context)
                                                     throws java.io.IOException
Specified by:
parseCreateField in class AbstractFieldMapper<java.lang.String>
Throws:
java.io.IOException

contentType

protected java.lang.String contentType()
Specified by:
contentType in class AbstractFieldMapper<java.lang.String>

toXContent

public void toXContent(XContentBuilder builder,
                       ToXContent.Params params)
                throws java.io.IOException
Specified by:
toXContent in interface ToXContent
Overrides:
toXContent in class AbstractFieldMapper<java.lang.String>
Throws:
java.io.IOException

merge

public void merge(XContentMapper mergeWith,
                  MergeContext mergeContext)
           throws MergeMappingException
Specified by:
merge in interface XContentMapper
Overrides:
merge in class AbstractFieldMapper<java.lang.String>
Throws:
MergeMappingException