org.elasticsearch.index.mapper.internal
Class UidFieldMapper

java.lang.Object
  extended by org.elasticsearch.index.mapper.core.AbstractFieldMapper<Uid>
      extended by org.elasticsearch.index.mapper.internal.UidFieldMapper
All Implemented Interfaces:
ToXContent, FieldMapper<Uid>, InternalMapper, Mapper, RootMapper

public class UidFieldMapper
extends AbstractFieldMapper<Uid>
implements InternalMapper, RootMapper


Nested Class Summary
static class UidFieldMapper.Builder
           
static class UidFieldMapper.Defaults
           
static class UidFieldMapper.TypeParser
           
 
Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.core.AbstractFieldMapper
AbstractFieldMapper.OpenBuilder<T extends AbstractFieldMapper.Builder,Y extends AbstractFieldMapper>
 
Nested classes/interfaces inherited from interface org.elasticsearch.index.mapper.Mapper
Mapper.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 String CONTENT_TYPE
           
static String NAME
           
static org.apache.lucene.index.Term TERM_FACTORY
           
 
Fields inherited from class org.elasticsearch.index.mapper.core.AbstractFieldMapper
boost, index, indexAnalyzer, indexOptions, names, omitNorms, searchAnalyzer, store, termVector
 
Fields inherited from interface org.elasticsearch.index.mapper.Mapper
EMPTY_ARRAY
 
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
 
Constructor Summary
  UidFieldMapper()
           
protected UidFieldMapper(String name)
           
protected UidFieldMapper(String name, String indexName)
           
 
Method Summary
 void close()
           
protected  String contentType()
           
 boolean includeInObject()
          Should the mapper be included in the root ObjectMapper.
 String indexedValue(String value)
          Returns the indexed value.
 void merge(Mapper mergeWith, MergeContext mergeContext)
           
 void parse(ParseContext context)
           
protected  org.apache.lucene.document.Fieldable parseCreateField(ParseContext context)
           
 void postParse(ParseContext context)
           
 void preParse(ParseContext context)
           
 org.apache.lucene.index.Term term(String uid)
           
 org.apache.lucene.index.Term term(String type, String id)
           
 XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params)
           
 void validate(ParseContext context)
           
 Uid value(org.apache.lucene.document.Fieldable field)
          Returns the actual value of the field.
 String valueAsString(org.apache.lucene.document.Fieldable field)
          Returns the actual value of the field as string.
 Uid valueFromString(String value)
           
 
Methods inherited from class org.elasticsearch.index.mapper.core.AbstractFieldMapper
analyzed, boost, customBoost, doXContentBody, fieldDataType, fieldFilter, fieldQuery, fuzzyQuery, fuzzyQuery, index, indexAnalyzer, indexed, indexOptions, indexOptionToString, name, names, nullValueFilter, omitNorms, prefixFilter, prefixQuery, queryStringTermQuery, rangeFilter, rangeQuery, searchAnalyzer, searchQuoteAnalyzer, store, stored, termVector, traverse, 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.Mapper
name, traverse, traverse
 

Field Detail

NAME

public static final String NAME

TERM_FACTORY

public static final org.apache.lucene.index.Term TERM_FACTORY

CONTENT_TYPE

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

UidFieldMapper

public UidFieldMapper()

UidFieldMapper

protected UidFieldMapper(String name)

UidFieldMapper

protected UidFieldMapper(String name,
                         String indexName)
Method Detail

preParse

public void preParse(ParseContext context)
              throws IOException
Specified by:
preParse in interface RootMapper
Throws:
IOException

postParse

public void postParse(ParseContext context)
               throws IOException
Specified by:
postParse in interface RootMapper
Throws:
IOException

parse

public void parse(ParseContext context)
           throws IOException
Specified by:
parse in interface Mapper
Overrides:
parse in class AbstractFieldMapper<Uid>
Throws:
IOException

validate

public void validate(ParseContext context)
              throws MapperParsingException
Specified by:
validate in interface RootMapper
Throws:
MapperParsingException

includeInObject

public boolean includeInObject()
Description copied from interface: RootMapper
Should the mapper be included in the root ObjectMapper.

Specified by:
includeInObject in interface RootMapper

parseCreateField

protected org.apache.lucene.document.Fieldable parseCreateField(ParseContext context)
                                                         throws IOException
Specified by:
parseCreateField in class AbstractFieldMapper<Uid>
Throws:
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>

valueFromString

public Uid valueFromString(String value)
Specified by:
valueFromString in interface FieldMapper<Uid>

valueAsString

public 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 String indexedValue(String value)
Description copied from interface: FieldMapper
Returns the indexed value.

Specified by:
indexedValue in interface FieldMapper<Uid>
Overrides:
indexedValue in class AbstractFieldMapper<Uid>

term

public org.apache.lucene.index.Term term(String type,
                                         String id)

term

public org.apache.lucene.index.Term term(String uid)

close

public void close()
Specified by:
close in interface Mapper
Overrides:
close in class AbstractFieldMapper<Uid>

contentType

protected String contentType()
Specified by:
contentType in class AbstractFieldMapper<Uid>

toXContent

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

merge

public void merge(Mapper mergeWith,
                  MergeContext mergeContext)
           throws MergeMappingException
Specified by:
merge in interface Mapper
Overrides:
merge in class AbstractFieldMapper<Uid>
Throws:
MergeMappingException


Copyright © 2009-2012. All Rights Reserved.