org.elasticsearch.index.mapper.xcontent
Class XContentStringFieldMapper

java.lang.Object
  extended by org.elasticsearch.index.mapper.xcontent.XContentFieldMapper<java.lang.String>
      extended by org.elasticsearch.index.mapper.xcontent.XContentStringFieldMapper
All Implemented Interfaces:
ToXContent, FieldMapper<java.lang.String>, XContentIncludeInAllMapper, XContentMapper

public class XContentStringFieldMapper
extends XContentFieldMapper<java.lang.String>
implements XContentIncludeInAllMapper


Nested Class Summary
static class XContentStringFieldMapper.Builder
           
static class XContentStringFieldMapper.Defaults
           
static class XContentStringFieldMapper.TypeParser
           
 
Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.xcontent.XContentFieldMapper
XContentFieldMapper.OpenBuilder<T extends XContentFieldMapper.Builder,Y extends XContentFieldMapper>
 
Nested classes/interfaces inherited from interface org.elasticsearch.index.mapper.xcontent.XContentMapper
XContentMapper.BuilderContext
 
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.MapParams, ToXContent.Params
 
Nested classes/interfaces inherited from interface org.elasticsearch.index.mapper.FieldMapper
FieldMapper.Names
 
Field Summary
static java.lang.String CONTENT_TYPE
           
 
Fields inherited from class org.elasticsearch.index.mapper.xcontent.XContentFieldMapper
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 XContentStringFieldMapper(FieldMapper.Names names, org.apache.lucene.document.Field.Index index, org.apache.lucene.document.Field.Store store, org.apache.lucene.document.Field.TermVector termVector, float boost, boolean omitNorms, boolean omitTermFreqAndPositions, java.lang.String nullValue, NamedAnalyzer indexAnalyzer, NamedAnalyzer searchAnalyzer)
           
 
Method Summary
protected  java.lang.String contentType()
           
protected  void doXContentBody(XContentBuilder builder)
           
 void includeInAll(java.lang.Boolean includeInAll)
           
 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 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.
 
Methods inherited from class org.elasticsearch.index.mapper.xcontent.XContentFieldMapper
analyzed, boost, fieldDataType, fieldFilter, fieldQuery, index, indexAnalyzer, indexed, name, names, omitNorms, omitTermFreqAndPositions, parse, queryStringTermQuery, rangeFilter, rangeQuery, searchAnalyzer, store, stored, termVector, toXContent, traverse, useFieldQueryWithQueryString, valueForSearch, valueFromTerm
 
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.xcontent.XContentMapper
name, parse, traverse
 
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContent
toXContent
 

Field Detail

CONTENT_TYPE

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

XContentStringFieldMapper

protected XContentStringFieldMapper(FieldMapper.Names names,
                                    org.apache.lucene.document.Field.Index index,
                                    org.apache.lucene.document.Field.Store store,
                                    org.apache.lucene.document.Field.TermVector termVector,
                                    float boost,
                                    boolean omitNorms,
                                    boolean omitTermFreqAndPositions,
                                    java.lang.String nullValue,
                                    NamedAnalyzer indexAnalyzer,
                                    NamedAnalyzer searchAnalyzer)
Method Detail

includeInAll

public void includeInAll(java.lang.Boolean includeInAll)
Specified by:
includeInAll in interface XContentIncludeInAllMapper

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>

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 XContentFieldMapper<java.lang.String>

parseCreateField

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

contentType

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

merge

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

doXContentBody

protected void doXContentBody(XContentBuilder builder)
                       throws java.io.IOException
Overrides:
doXContentBody in class XContentFieldMapper<java.lang.String>
Throws:
java.io.IOException