public class ParentFieldMapper extends AbstractFieldMapper<Uid> implements InternalMapper, RootMapper
Modifier and Type | Class and Description |
---|---|
static class |
ParentFieldMapper.Builder |
static class |
ParentFieldMapper.Defaults |
static class |
ParentFieldMapper.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 |
---|---|
|
ParentFieldMapper(Settings indexSettings) |
protected |
ParentFieldMapper(String name,
String indexName,
String type,
PostingsFormatProvider postingsFormat,
Settings fieldDataSettings,
Settings indexSettings) |
Modifier and Type | Method and Description |
---|---|
boolean |
active() |
protected String |
contentType() |
FieldDataType |
defaultFieldDataType() |
org.apache.lucene.document.FieldType |
defaultFieldType() |
boolean |
hasDocValues() |
boolean |
includeInObject()
Should the mapper be included in the root
ObjectMapper . |
org.apache.lucene.util.BytesRef |
indexedValueForSearch(Object value)
Returns the indexed value used to construct search "values".
|
void |
merge(Mapper mergeWith,
MergeContext mergeContext) |
protected void |
parseCreateField(ParseContext context,
List<org.apache.lucene.document.Field> fields)
Parse the field value and populate
fields . |
void |
postParse(ParseContext context)
Called after
Mapper.parse(ParseContext) on the RootObjectMapper . |
void |
preParse(ParseContext context)
Called before
Mapper.parse(ParseContext) on the RootObjectMapper . |
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) |
String |
type() |
boolean |
useTermQueryWithQueryString()
We don't need to analyzer the text, and we need to convert it to UID...
|
Uid |
value(Object value)
Returns the actual value of the field.
|
Object |
valueForSearch(Object value)
Returns the value that will be used as a result for search.
|
boost, close, copyTo, customBoost, defaultDocValuesFormat, defaultPostingFormat, docValuesFormatProvider, doXContentBody, fieldDataTermsFilter, fieldDataType, fieldType, fuzzyQuery, indexAnalyzer, indexOptionToString, indexTokenizeOptionToString, isGenerated, isNumeric, isSortable, name, names, normsLoading, nullValueFilter, parse, postingsFormatProvider, prefixFilter, prefixQuery, queryStringTermQuery, rangeFilter, rangeQuery, regexpFilter, regexpQuery, searchAnalyzer, searchQuoteAnalyzer, similarity, supportsNullValue, termVectorOptionsToString, traverse, traverse
public static final String NAME
public static final String CONTENT_TYPE
protected ParentFieldMapper(String name, String indexName, String type, PostingsFormatProvider postingsFormat, @Nullable Settings fieldDataSettings, Settings indexSettings)
public ParentFieldMapper(Settings indexSettings)
public String type()
public org.apache.lucene.document.FieldType defaultFieldType()
defaultFieldType
in class AbstractFieldMapper<Uid>
public FieldDataType defaultFieldDataType()
defaultFieldDataType
in class AbstractFieldMapper<Uid>
public boolean hasDocValues()
hasDocValues
in interface FieldMapper<Uid>
hasDocValues
in class AbstractFieldMapper<Uid>
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 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<Uid>
IOException
public Uid value(Object value)
FieldMapper
value
in interface FieldMapper<Uid>
public Object valueForSearch(Object value)
FieldMapper
valueForSearch
in interface FieldMapper<Uid>
valueForSearch
in class AbstractFieldMapper<Uid>
public org.apache.lucene.util.BytesRef indexedValueForSearch(Object value)
FieldMapper
indexedValueForSearch
in interface FieldMapper<Uid>
indexedValueForSearch
in class AbstractFieldMapper<Uid>
public org.apache.lucene.search.Query termQuery(Object value, @Nullable QueryParseContext context)
termQuery
in interface FieldMapper<Uid>
termQuery
in class AbstractFieldMapper<Uid>
public org.apache.lucene.search.Filter termFilter(Object value, @Nullable QueryParseContext context)
termFilter
in interface FieldMapper<Uid>
termFilter
in class AbstractFieldMapper<Uid>
public org.apache.lucene.search.Filter termsFilter(List values, @Nullable QueryParseContext context)
termsFilter
in interface FieldMapper<Uid>
termsFilter
in class AbstractFieldMapper<Uid>
public boolean useTermQueryWithQueryString()
useTermQueryWithQueryString
in interface FieldMapper<Uid>
useTermQueryWithQueryString
in class AbstractFieldMapper<Uid>
protected String contentType()
contentType
in class AbstractFieldMapper<Uid>
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent
in interface ToXContent
toXContent
in class AbstractFieldMapper<Uid>
IOException
public void merge(Mapper mergeWith, MergeContext mergeContext) throws MergeMappingException
merge
in interface Mapper
merge
in class AbstractFieldMapper<Uid>
MergeMappingException
public boolean active()
Copyright © 2009–2015. All rights reserved.