public class IdFieldMapper extends AbstractFieldMapper<String> implements InternalMapper, RootMapper
Modifier and Type | Class and Description |
---|---|
static class |
IdFieldMapper.Builder |
static class |
IdFieldMapper.Defaults |
static class |
IdFieldMapper.TypeParser |
AbstractFieldMapper.CopyTo, AbstractFieldMapper.MultiFields
Mapper.BuilderContext
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
FieldMapper.Loading, FieldMapper.Names
Modifier and Type | Field and Description |
---|---|
static String |
CONTENT_TYPE |
static String |
NAME |
boost, copyTo, customFieldDataSettings, docValues, docValuesFormat, fieldDataType, fieldType, indexAnalyzer, multiFields, names, normsLoading, postingsFormat, searchAnalyzer, similarity
EMPTY_ARRAY
EMPTY_PARAMS
DOC_VALUES_FORMAT
Modifier | Constructor and Description |
---|---|
|
IdFieldMapper() |
|
IdFieldMapper(org.apache.lucene.document.FieldType fieldType) |
protected |
IdFieldMapper(String name,
String indexName,
org.apache.lucene.document.FieldType fieldType,
Boolean docValues) |
protected |
IdFieldMapper(String name,
String indexName,
float boost,
org.apache.lucene.document.FieldType fieldType,
Boolean docValues,
String path,
PostingsFormatProvider postingsProvider,
DocValuesFormatProvider docValuesProvider,
Settings fieldDataSettings,
Settings indexSettings) |
Modifier and Type | Method and Description |
---|---|
protected String |
contentType() |
FieldDataType |
defaultFieldDataType() |
org.apache.lucene.document.FieldType |
defaultFieldType() |
boolean |
includeInObject()
Should the mapper be included in the root
ObjectMapper . |
void |
merge(Mapper mergeWith,
MergeContext mergeContext) |
void |
parse(ParseContext context) |
protected void |
parseCreateField(ParseContext context,
List<org.apache.lucene.document.Field> fields)
Parse the field value and populate
fields . |
String |
path() |
void |
postParse(ParseContext context)
Called after
Mapper.parse(ParseContext) on the RootObjectMapper . |
org.apache.lucene.search.Filter |
prefixFilter(Object value,
QueryParseContext context) |
org.apache.lucene.search.Query |
prefixQuery(Object value,
org.apache.lucene.search.MultiTermQuery.RewriteMethod method,
QueryParseContext context) |
void |
preParse(ParseContext context)
Called before
Mapper.parse(ParseContext) on the RootObjectMapper . |
org.apache.lucene.search.Filter |
regexpFilter(Object value,
int flags,
int maxDeterminizedStates,
QueryParseContext context) |
org.apache.lucene.search.Query |
regexpQuery(Object value,
int flags,
int maxDeterminizedStates,
org.apache.lucene.search.MultiTermQuery.RewriteMethod method,
QueryParseContext context) |
org.apache.lucene.search.Filter |
termFilter(Object value,
QueryParseContext context) |
org.apache.lucene.search.Query |
termQuery(Object value,
QueryParseContext context) |
org.apache.lucene.search.Filter |
termsFilter(List values,
QueryParseContext context) |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
boolean |
useTermQueryWithQueryString()
Should the field query
FieldMapper.termQuery(Object, org.elasticsearch.index.query.QueryParseContext) be used when detecting this
field in query string. |
String |
value(Object value)
Returns the actual value of the field.
|
boost, close, copyTo, customBoost, defaultDocValuesFormat, defaultPostingFormat, docValuesFormatProvider, doXContentBody, fieldDataTermsFilter, fieldDataType, fieldType, fuzzyQuery, hasDocValues, indexAnalyzer, indexedValueForSearch, indexOptionToString, indexTokenizeOptionToString, isGenerated, isNumeric, isSortable, name, names, normsLoading, nullValueFilter, postingsFormatProvider, queryStringTermQuery, rangeFilter, rangeQuery, searchAnalyzer, searchQuoteAnalyzer, similarity, supportsNullValue, termVectorOptionsToString, traverse, traverse, valueForSearch
public static final String NAME
public static final String CONTENT_TYPE
public IdFieldMapper()
public IdFieldMapper(org.apache.lucene.document.FieldType fieldType)
protected IdFieldMapper(String name, String indexName, org.apache.lucene.document.FieldType fieldType, Boolean docValues)
protected IdFieldMapper(String name, String indexName, float boost, org.apache.lucene.document.FieldType fieldType, Boolean docValues, String path, PostingsFormatProvider postingsProvider, DocValuesFormatProvider docValuesProvider, @Nullable Settings fieldDataSettings, Settings indexSettings)
public String path()
public org.apache.lucene.document.FieldType defaultFieldType()
defaultFieldType
in class AbstractFieldMapper<String>
public FieldDataType defaultFieldDataType()
defaultFieldDataType
in class AbstractFieldMapper<String>
public String value(Object value)
FieldMapper
value
in interface FieldMapper<String>
public boolean useTermQueryWithQueryString()
FieldMapper
FieldMapper.termQuery(Object, org.elasticsearch.index.query.QueryParseContext)
be used when detecting this
field in query string.useTermQueryWithQueryString
in interface FieldMapper<String>
useTermQueryWithQueryString
in class AbstractFieldMapper<String>
public org.apache.lucene.search.Query termQuery(Object value, @Nullable QueryParseContext context)
termQuery
in interface FieldMapper<String>
termQuery
in class AbstractFieldMapper<String>
public org.apache.lucene.search.Filter termFilter(Object value, @Nullable QueryParseContext context)
termFilter
in interface FieldMapper<String>
termFilter
in class AbstractFieldMapper<String>
public org.apache.lucene.search.Filter termsFilter(List values, @Nullable QueryParseContext context)
termsFilter
in interface FieldMapper<String>
termsFilter
in class AbstractFieldMapper<String>
public org.apache.lucene.search.Query prefixQuery(Object value, @Nullable org.apache.lucene.search.MultiTermQuery.RewriteMethod method, @Nullable QueryParseContext context)
prefixQuery
in interface FieldMapper<String>
prefixQuery
in class AbstractFieldMapper<String>
public org.apache.lucene.search.Filter prefixFilter(Object value, @Nullable QueryParseContext context)
prefixFilter
in interface FieldMapper<String>
prefixFilter
in class AbstractFieldMapper<String>
public org.apache.lucene.search.Query regexpQuery(Object value, int flags, int maxDeterminizedStates, @Nullable org.apache.lucene.search.MultiTermQuery.RewriteMethod method, @Nullable QueryParseContext context)
regexpQuery
in interface FieldMapper<String>
regexpQuery
in class AbstractFieldMapper<String>
public org.apache.lucene.search.Filter regexpFilter(Object value, int flags, int maxDeterminizedStates, @Nullable QueryParseContext context)
regexpFilter
in interface FieldMapper<String>
regexpFilter
in class AbstractFieldMapper<String>
public void preParse(ParseContext context) throws IOException
RootMapper
Mapper.parse(ParseContext)
on the RootObjectMapper
.preParse
in interface RootMapper
IOException
public void postParse(ParseContext context) throws IOException
RootMapper
Mapper.parse(ParseContext)
on the RootObjectMapper
.postParse
in interface RootMapper
IOException
public void parse(ParseContext context) throws IOException
parse
in interface Mapper
parse
in class AbstractFieldMapper<String>
IOException
public boolean includeInObject()
RootMapper
ObjectMapper
.
If this method returns true, then Mapper.parse(ParseContext)
will be
called if the context has a property that matches the name of this
RootMapper
. Otherwise Mapper.parse(ParseContext)
will not
be called.includeInObject
in interface RootMapper
protected void parseCreateField(ParseContext context, List<org.apache.lucene.document.Field> fields) throws IOException
AbstractFieldMapper
fields
.parseCreateField
in class AbstractFieldMapper<String>
IOException
protected String contentType()
contentType
in class AbstractFieldMapper<String>
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent
in interface ToXContent
toXContent
in class AbstractFieldMapper<String>
IOException
public void merge(Mapper mergeWith, MergeContext mergeContext) throws MergeMappingException
merge
in interface Mapper
merge
in class AbstractFieldMapper<String>
MergeMappingException
Copyright © 2009–2015. All rights reserved.