org.elasticsearch.index.mapper.internal
Class IdFieldMapper
java.lang.Object
org.elasticsearch.index.mapper.core.AbstractFieldMapper<String>
org.elasticsearch.index.mapper.internal.IdFieldMapper
- All Implemented Interfaces:
- ToXContent, FieldMapper<String>, InternalMapper, Mapper, RootMapper
public class IdFieldMapper
- extends AbstractFieldMapper<String>
- implements InternalMapper, RootMapper
Constructor Summary |
|
IdFieldMapper()
|
|
IdFieldMapper(org.apache.lucene.document.Field.Index index)
|
protected |
IdFieldMapper(String name,
String indexName,
org.apache.lucene.document.Field.Index index)
|
protected |
IdFieldMapper(String name,
String indexName,
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,
org.apache.lucene.index.FieldInfo.IndexOptions indexOptions,
String path)
|
Methods inherited from class org.elasticsearch.index.mapper.core.AbstractFieldMapper |
analyzed, boost, close, customBoost, doXContentBody, fieldDataType, fuzzyQuery, fuzzyQuery, index, indexAnalyzer, indexed, indexOptions, indexOptionToString, name, names, nullValueFilter, omitNorms, queryStringTermQuery, rangeFilter, rangeQuery, searchAnalyzer, searchQuoteAnalyzer, store, stored, termVector, traverse, traverse, valueForSearch |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAME
public static final String NAME
- See Also:
- Constant Field Values
CONTENT_TYPE
public static final String CONTENT_TYPE
- See Also:
- Constant Field Values
IdFieldMapper
public IdFieldMapper()
IdFieldMapper
public IdFieldMapper(org.apache.lucene.document.Field.Index index)
IdFieldMapper
protected IdFieldMapper(String name,
String indexName,
org.apache.lucene.document.Field.Index index)
IdFieldMapper
protected IdFieldMapper(String name,
String indexName,
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,
org.apache.lucene.index.FieldInfo.IndexOptions indexOptions,
String path)
path
public String path()
value
public String value(org.apache.lucene.document.Document document)
value
public 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<String>
valueFromString
public String valueFromString(String value)
- Specified by:
valueFromString
in interface FieldMapper<String>
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<String>
indexedValue
public String indexedValue(String value)
- Description copied from interface:
FieldMapper
- Returns the indexed value.
- Specified by:
indexedValue
in interface FieldMapper<String>
- Overrides:
indexedValue
in class AbstractFieldMapper<String>
useFieldQueryWithQueryString
public boolean useFieldQueryWithQueryString()
- Description copied from interface:
FieldMapper
- Should the field query
FieldMapper.fieldQuery(String, org.elasticsearch.index.query.QueryParseContext)
be used when detecting this
field in query string.
- Specified by:
useFieldQueryWithQueryString
in interface FieldMapper<String>
- Overrides:
useFieldQueryWithQueryString
in class AbstractFieldMapper<String>
fieldQuery
public org.apache.lucene.search.Query fieldQuery(String value,
@Nullable
QueryParseContext context)
- Description copied from interface:
FieldMapper
- A field query for the specified value.
- Specified by:
fieldQuery
in interface FieldMapper<String>
- Overrides:
fieldQuery
in class AbstractFieldMapper<String>
fieldFilter
public org.apache.lucene.search.Filter fieldFilter(String value,
@Nullable
QueryParseContext context)
- Specified by:
fieldFilter
in interface FieldMapper<String>
- Overrides:
fieldFilter
in class AbstractFieldMapper<String>
prefixQuery
public org.apache.lucene.search.Query prefixQuery(String value,
@Nullable
org.apache.lucene.search.MultiTermQuery.RewriteMethod method,
@Nullable
QueryParseContext context)
- Specified by:
prefixQuery
in interface FieldMapper<String>
- Overrides:
prefixQuery
in class AbstractFieldMapper<String>
prefixFilter
public org.apache.lucene.search.Filter prefixFilter(String value,
@Nullable
QueryParseContext context)
- Specified by:
prefixFilter
in interface FieldMapper<String>
- Overrides:
prefixFilter
in class AbstractFieldMapper<String>
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<String>
- 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.Field parseCreateField(ParseContext context)
throws IOException
- Specified by:
parseCreateField
in class AbstractFieldMapper<String>
- Throws:
IOException
contentType
protected String contentType()
- Specified by:
contentType
in class AbstractFieldMapper<String>
toXContent
public XContentBuilder toXContent(XContentBuilder builder,
ToXContent.Params params)
throws IOException
- Specified by:
toXContent
in interface ToXContent
- Overrides:
toXContent
in class AbstractFieldMapper<String>
- Throws:
IOException
merge
public void merge(Mapper mergeWith,
MergeContext mergeContext)
throws MergeMappingException
- Specified by:
merge
in interface Mapper
- Overrides:
merge
in class AbstractFieldMapper<String>
- Throws:
MergeMappingException
Copyright © 2009-2012. All Rights Reserved.