public class StringFieldMapper extends AbstractFieldMapper<String> implements AllFieldMapper.IncludeInAll
Modifier and Type | Class and Description |
---|---|
static class |
StringFieldMapper.Builder |
static class |
StringFieldMapper.Defaults |
static class |
StringFieldMapper.TypeParser |
static class |
StringFieldMapper.ValueAndBoost
Parsed value and boost to be returned from
parseCreateFieldForString(org.elasticsearch.index.mapper.ParseContext, java.lang.String, float) . |
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 |
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 |
---|---|
protected |
StringFieldMapper(FieldMapper.Names names,
float boost,
org.apache.lucene.document.FieldType fieldType,
org.apache.lucene.document.FieldType defaultFieldType,
Boolean docValues,
String nullValue,
NamedAnalyzer indexAnalyzer,
NamedAnalyzer searchAnalyzer,
NamedAnalyzer searchQuotedAnalyzer,
int positionOffsetGap,
int ignoreAbove,
PostingsFormatProvider postingsFormat,
DocValuesFormatProvider docValuesFormat,
SimilarityProvider similarity,
FieldMapper.Loading normsLoading,
Settings fieldDataSettings,
Settings indexSettings,
AbstractFieldMapper.MultiFields multiFields,
AbstractFieldMapper.CopyTo copyTo) |
Modifier and Type | Method and Description |
---|---|
protected String |
contentType() |
protected boolean |
customBoost()
Derived classes can override it to specify that boost value is set by derived classes.
|
FieldDataType |
defaultFieldDataType() |
org.apache.lucene.document.FieldType |
defaultFieldType() |
protected void |
doXContentBody(XContentBuilder builder,
boolean includeDefaults,
ToXContent.Params params) |
int |
getPositionOffsetGap() |
void |
includeInAll(Boolean includeInAll) |
void |
includeInAllIfNotSet(Boolean includeInAll) |
void |
merge(Mapper mergeWith,
MergeContext mergeContext) |
org.apache.lucene.search.Filter |
nullValueFilter()
Null value filter, returns null if there is no null value associated with the field.
|
protected void |
parseCreateField(ParseContext context,
List<org.apache.lucene.document.Field> fields)
Parse the field value and populate
fields . |
static StringFieldMapper.ValueAndBoost |
parseCreateFieldForString(ParseContext context,
String nullValue,
float defaultBoost)
Parse a field as though it were a string.
|
org.apache.lucene.analysis.Analyzer |
searchQuoteAnalyzer()
The analyzer that will be used for quoted search on the field.
|
void |
unsetIncludeInAll() |
String |
value(Object value)
Returns the actual value of the field.
|
boost, close, copyTo, defaultDocValuesFormat, defaultPostingFormat, docValuesFormatProvider, fieldDataTermsFilter, fieldDataType, fieldType, fuzzyQuery, hasDocValues, indexAnalyzer, indexedValueForSearch, indexOptionToString, indexTokenizeOptionToString, isGenerated, isNumeric, isSortable, name, names, normsLoading, parse, postingsFormatProvider, prefixFilter, prefixQuery, queryStringTermQuery, rangeFilter, rangeQuery, regexpFilter, regexpQuery, searchAnalyzer, similarity, supportsNullValue, termFilter, termQuery, termsFilter, termVectorOptionsToString, toXContent, traverse, traverse, useTermQueryWithQueryString, valueForSearch
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, name, parse, traverse, traverse
toXContent
public static final String CONTENT_TYPE
protected StringFieldMapper(FieldMapper.Names names, float boost, org.apache.lucene.document.FieldType fieldType, org.apache.lucene.document.FieldType defaultFieldType, Boolean docValues, String nullValue, NamedAnalyzer indexAnalyzer, NamedAnalyzer searchAnalyzer, NamedAnalyzer searchQuotedAnalyzer, int positionOffsetGap, int ignoreAbove, PostingsFormatProvider postingsFormat, DocValuesFormatProvider docValuesFormat, SimilarityProvider similarity, FieldMapper.Loading normsLoading, @Nullable Settings fieldDataSettings, Settings indexSettings, AbstractFieldMapper.MultiFields multiFields, AbstractFieldMapper.CopyTo copyTo)
public org.apache.lucene.document.FieldType defaultFieldType()
defaultFieldType
in class AbstractFieldMapper<String>
public FieldDataType defaultFieldDataType()
defaultFieldDataType
in class AbstractFieldMapper<String>
public void includeInAll(Boolean includeInAll)
includeInAll
in interface AllFieldMapper.IncludeInAll
public void includeInAllIfNotSet(Boolean includeInAll)
includeInAllIfNotSet
in interface AllFieldMapper.IncludeInAll
public void unsetIncludeInAll()
unsetIncludeInAll
in interface AllFieldMapper.IncludeInAll
public String value(Object value)
FieldMapper
value
in interface FieldMapper<String>
protected boolean customBoost()
AbstractFieldMapper
customBoost
in class AbstractFieldMapper<String>
public int getPositionOffsetGap()
public org.apache.lucene.analysis.Analyzer searchQuoteAnalyzer()
FieldMapper
searchQuoteAnalyzer
in interface FieldMapper<String>
searchQuoteAnalyzer
in class AbstractFieldMapper<String>
public org.apache.lucene.search.Filter nullValueFilter()
FieldMapper
nullValueFilter
in interface FieldMapper<String>
nullValueFilter
in class AbstractFieldMapper<String>
protected void parseCreateField(ParseContext context, List<org.apache.lucene.document.Field> fields) throws IOException
AbstractFieldMapper
fields
.parseCreateField
in class AbstractFieldMapper<String>
IOException
public static StringFieldMapper.ValueAndBoost parseCreateFieldForString(ParseContext context, String nullValue, float defaultBoost) throws IOException
context
- parse context used during parsingnullValue
- value to use for nulldefaultBoost
- default boost value returned unless overwritten in the fieldIOException
- if thrown while parsingprotected String contentType()
contentType
in class AbstractFieldMapper<String>
public void merge(Mapper mergeWith, MergeContext mergeContext) throws MergeMappingException
merge
in interface Mapper
merge
in class AbstractFieldMapper<String>
MergeMappingException
protected void doXContentBody(XContentBuilder builder, boolean includeDefaults, ToXContent.Params params) throws IOException
doXContentBody
in class AbstractFieldMapper<String>
IOException
Copyright © 2009–2015. All rights reserved.