org.elasticsearch.index.mapper.json
Class JsonUidFieldMapper

java.lang.Object
  extended by org.elasticsearch.index.mapper.json.JsonFieldMapper<Uid>
      extended by org.elasticsearch.index.mapper.json.JsonUidFieldMapper
All Implemented Interfaces:
FieldMapper<Uid>, InternalMapper, JsonMapper, UidFieldMapper, ToJson

public class JsonUidFieldMapper
extends JsonFieldMapper<Uid>
implements UidFieldMapper


Nested Class Summary
static class JsonUidFieldMapper.Builder
           
static class JsonUidFieldMapper.Defaults
           
 
Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.json.JsonFieldMapper
JsonFieldMapper.OpenBuilder<T extends JsonFieldMapper.Builder,Y extends JsonFieldMapper>
 
Nested classes/interfaces inherited from interface org.elasticsearch.index.mapper.FieldMapper
FieldMapper.Names
 
Nested classes/interfaces inherited from interface org.elasticsearch.index.mapper.json.JsonMapper
JsonMapper.BuilderContext
 
Nested classes/interfaces inherited from interface org.elasticsearch.util.json.ToJson
ToJson.MapParams, ToJson.Params
 
Field Summary
static java.lang.String JSON_TYPE
           
 
Fields inherited from class org.elasticsearch.index.mapper.json.JsonFieldMapper
boost, index, indexAnalyzer, names, omitNorms, omitTermFreqAndPositions, searchAnalyzer, store, termVector
 
Fields inherited from interface org.elasticsearch.index.mapper.UidFieldMapper
NAME
 
Fields inherited from interface org.elasticsearch.index.mapper.json.JsonMapper
EMPTY_ARRAY
 
Fields inherited from interface org.elasticsearch.util.json.ToJson
EMPTY_PARAMS
 
Constructor Summary
protected JsonUidFieldMapper()
           
protected JsonUidFieldMapper(java.lang.String name)
           
protected JsonUidFieldMapper(java.lang.String name, java.lang.String indexName)
           
 
Method Summary
 java.lang.String indexedValue(java.lang.String value)
          Returns the indexed value.
protected  java.lang.String jsonType()
           
 void merge(JsonMapper mergeWith, JsonMergeContext mergeContext)
           
protected  org.apache.lucene.document.Field parseCreateField(JsonParseContext jsonContext)
           
 org.apache.lucene.index.Term term(java.lang.String uid)
           
 org.apache.lucene.index.Term term(java.lang.String type, java.lang.String id)
           
 void toJson(JsonBuilder builder, ToJson.Params params)
           
 Uid 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.json.JsonFieldMapper
analyzed, boost, doJsonBody, fieldFilter, fieldQuery, index, indexAnalyzer, indexed, indexedValue, name, names, omitNorms, omitTermFreqAndPositions, parse, queryStringTermQuery, rangeFilter, rangeQuery, searchAnalyzer, shouldBreakTermEnumeration, sortType, store, stored, termVector, traverse, useFieldQueryWithQueryString, valueForSearch, valueForSearch, valueFromString, 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.FieldMapper
analyzed, boost, fieldFilter, fieldQuery, index, indexAnalyzer, indexed, indexedValue, names, omitNorms, omitTermFreqAndPositions, queryStringTermQuery, rangeFilter, rangeQuery, searchAnalyzer, shouldBreakTermEnumeration, sortType, store, stored, termVector, useFieldQueryWithQueryString, valueForSearch, valueForSearch, valueFromString, valueFromTerm
 

Field Detail

JSON_TYPE

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

JsonUidFieldMapper

protected JsonUidFieldMapper()

JsonUidFieldMapper

protected JsonUidFieldMapper(java.lang.String name)

JsonUidFieldMapper

protected JsonUidFieldMapper(java.lang.String name,
                             java.lang.String indexName)
Method Detail

parseCreateField

protected org.apache.lucene.document.Field parseCreateField(JsonParseContext jsonContext)
                                                     throws java.io.IOException
Specified by:
parseCreateField in class JsonFieldMapper<Uid>
Throws:
java.io.IOException

value

public Uid 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<Uid>

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<Uid>

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<Uid>
Overrides:
indexedValue in class JsonFieldMapper<Uid>

term

public org.apache.lucene.index.Term term(java.lang.String type,
                                         java.lang.String id)
Specified by:
term in interface UidFieldMapper

term

public org.apache.lucene.index.Term term(java.lang.String uid)
Specified by:
term in interface UidFieldMapper

jsonType

protected java.lang.String jsonType()
Specified by:
jsonType in class JsonFieldMapper<Uid>

toJson

public void toJson(JsonBuilder builder,
                   ToJson.Params params)
            throws java.io.IOException
Specified by:
toJson in interface ToJson
Overrides:
toJson in class JsonFieldMapper<Uid>
Throws:
java.io.IOException

merge

public void merge(JsonMapper mergeWith,
                  JsonMergeContext mergeContext)
           throws MergeMappingException
Specified by:
merge in interface JsonMapper
Overrides:
merge in class JsonFieldMapper<Uid>
Throws:
MergeMappingException