public class TokenCountFieldMapper extends IntegerFieldMapper
FieldMapper that takes a string and writes a count of the tokens in that string
to the index. In most ways the mapper acts just like an IntegerFieldMapper.| Modifier and Type | Class and Description |
|---|---|
static class |
TokenCountFieldMapper.Builder |
static class |
TokenCountFieldMapper.Defaults |
static class |
TokenCountFieldMapper.TypeParser |
IntegerFieldMapper.CustomIntegerNumericFieldNumberFieldMapper.CustomLongNumericDocValuesField, NumberFieldMapper.CustomNumericDocValuesField, NumberFieldMapper.CustomNumericFieldAbstractFieldMapper.CopyTo, AbstractFieldMapper.MultiFieldsMapper.BuilderContextToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsFieldMapper.Loading, FieldMapper.Names| Modifier and Type | Field and Description |
|---|---|
static String |
CONTENT_TYPE |
coerce, ignoreMalformed, includeInAll, precisionStep, useSortedNumericDocValuesboost, copyTo, customFieldDataSettings, docValues, docValuesFormat, fieldDataType, fieldType, indexAnalyzer, multiFields, names, normsLoading, postingsFormat, searchAnalyzer, similarityEMPTY_ARRAYEMPTY_PARAMSDOC_VALUES_FORMAT| Modifier | Constructor and Description |
|---|---|
protected |
TokenCountFieldMapper(FieldMapper.Names names,
int precisionStep,
float boost,
org.apache.lucene.document.FieldType fieldType,
Boolean docValues,
Integer nullValue,
Explicit<Boolean> ignoreMalformed,
Explicit<Boolean> coerce,
PostingsFormatProvider postingsProvider,
DocValuesFormatProvider docValuesProvider,
SimilarityProvider similarity,
FieldMapper.Loading normsLoading,
Settings fieldDataSettings,
Settings indexSettings,
NamedAnalyzer analyzer,
AbstractFieldMapper.MultiFields multiFields,
AbstractFieldMapper.CopyTo copyTo) |
| Modifier and Type | Method and Description |
|---|---|
String |
analyzer()
Name of analyzer.
|
protected String |
contentType() |
protected void |
doXContentBody(XContentBuilder builder,
boolean includeDefaults,
ToXContent.Params params) |
boolean |
isGenerated()
Returns if this field is only generated when indexing.
|
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. |
addIntegerFields, customBoost, defaultFieldDataType, defaultFieldType, fuzzyQuery, indexedValueForSearch, innerParseCreateField, maxPrecisionStep, nullValue, nullValueFilter, rangeFilter, rangeFilter, rangeQuery, stats, valueaddDocValue, close, fieldDataTermsFilter, includeInAll, includeInAllIfNotSet, isNumeric, parseDoubleValue, parseLongValue, popCachedStream, precisionStep, termFilter, termQuery, unsetIncludeInAll, useTermQueryWithQueryString, valueForSearchboost, copyTo, defaultDocValuesFormat, defaultPostingFormat, docValuesFormatProvider, fieldDataType, fieldType, hasDocValues, indexAnalyzer, indexOptionToString, indexTokenizeOptionToString, isSortable, name, names, normsLoading, parse, postingsFormatProvider, prefixFilter, prefixQuery, queryStringTermQuery, regexpFilter, regexpQuery, searchAnalyzer, searchQuoteAnalyzer, similarity, supportsNullValue, termsFilter, termVectorOptionsToString, toXContent, traverse, traverseclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitname, parse, traverse, traversetoXContentpublic static final String CONTENT_TYPE
protected TokenCountFieldMapper(FieldMapper.Names names, int precisionStep, float boost, org.apache.lucene.document.FieldType fieldType, Boolean docValues, Integer nullValue, Explicit<Boolean> ignoreMalformed, Explicit<Boolean> coerce, PostingsFormatProvider postingsProvider, DocValuesFormatProvider docValuesProvider, SimilarityProvider similarity, FieldMapper.Loading normsLoading, Settings fieldDataSettings, Settings indexSettings, NamedAnalyzer analyzer, AbstractFieldMapper.MultiFields multiFields, AbstractFieldMapper.CopyTo copyTo)
protected void parseCreateField(ParseContext context, List<org.apache.lucene.document.Field> fields) throws IOException
AbstractFieldMapperfields.parseCreateField in class NumberFieldMapper<Integer>IOExceptionpublic String analyzer()
protected String contentType()
contentType in class IntegerFieldMapperpublic void merge(Mapper mergeWith, MergeContext mergeContext) throws MergeMappingException
merge in interface Mappermerge in class IntegerFieldMapperMergeMappingExceptionprotected void doXContentBody(XContentBuilder builder, boolean includeDefaults, ToXContent.Params params) throws IOException
doXContentBody in class IntegerFieldMapperIOExceptionpublic boolean isGenerated()
AbstractFieldMapperisGenerated in interface FieldMapper<Integer>isGenerated in class AbstractFieldMapper<Integer>Copyright © 2009–2016. All rights reserved.