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.MultiFieldsMapper.BuilderContextToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsFieldMapper.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, similarityEMPTY_ARRAYEMPTY_PARAMSDOC_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, stats, supportsNullValue, termFilter, termQuery, termsFilter, termVectorOptionsToString, toXContent, traverse, traverse, useTermQueryWithQueryString, valueForSearchclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, name, parse, traverse, traversetoXContentpublic 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.IncludeInAllpublic void includeInAllIfNotSet(Boolean includeInAll)
includeInAllIfNotSet in interface AllFieldMapper.IncludeInAllpublic void unsetIncludeInAll()
unsetIncludeInAll in interface AllFieldMapper.IncludeInAllpublic String value(Object value)
FieldMappervalue in interface FieldMapper<String>protected boolean customBoost()
AbstractFieldMappercustomBoost in class AbstractFieldMapper<String>public int getPositionOffsetGap()
public org.apache.lucene.analysis.Analyzer searchQuoteAnalyzer()
FieldMappersearchQuoteAnalyzer in interface FieldMapper<String>searchQuoteAnalyzer in class AbstractFieldMapper<String>public org.apache.lucene.search.Filter nullValueFilter()
FieldMappernullValueFilter in interface FieldMapper<String>nullValueFilter in class AbstractFieldMapper<String>protected void parseCreateField(ParseContext context, List<org.apache.lucene.document.Field> fields) throws IOException
AbstractFieldMapperfields.parseCreateField in class AbstractFieldMapper<String>IOExceptionpublic 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 Mappermerge in class AbstractFieldMapper<String>MergeMappingExceptionprotected void doXContentBody(XContentBuilder builder, boolean includeDefaults, ToXContent.Params params) throws IOException
doXContentBody in class AbstractFieldMapper<String>IOExceptionCopyright © 2009–2016. All rights reserved.