public class CompletionFieldMapper extends AbstractFieldMapper<String>
| Modifier and Type | Class and Description |
|---|---|
static class |
CompletionFieldMapper.Builder |
static class |
CompletionFieldMapper.Defaults |
static class |
CompletionFieldMapper.Fields |
static class |
CompletionFieldMapper.TypeParser |
AbstractFieldMapper.CopyTo, AbstractFieldMapper.MultiFieldsFieldMapper.Loading, FieldMapper.NamesMapper.BuilderContextToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params| Modifier and Type | Field and Description |
|---|---|
static Set<String> |
ALLOWED_CONTENT_FIELD_NAMES |
static String |
CONTENT_TYPE |
boost, copyTo, customFieldDataSettings, docValues, docValuesFormat, fieldDataType, fieldType, indexAnalyzer, multiFields, names, normsLoading, postingsFormat, searchAnalyzer, similarityDOC_VALUES_FORMATEMPTY_ARRAYEMPTY_PARAMS| Constructor and Description |
|---|
CompletionFieldMapper(FieldMapper.Names names,
NamedAnalyzer indexAnalyzer,
NamedAnalyzer searchAnalyzer,
PostingsFormatProvider postingsProvider,
SimilarityProvider similarity,
boolean payloads,
boolean preserveSeparators,
boolean preservePositionIncrements,
int maxInputLength,
AbstractFieldMapper.MultiFields multiFields,
AbstractFieldMapper.CopyTo copyTo,
SortedMap<String,ContextMapping> contextMappings) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.lucene.util.BytesRef |
buildPayload(org.apache.lucene.util.BytesRef surfaceForm,
long weight,
org.apache.lucene.util.BytesRef payload) |
protected String |
contentType() |
static int |
correctSubStringLen(String input,
int len) |
FieldDataType |
defaultFieldDataType() |
org.apache.lucene.document.FieldType |
defaultFieldType() |
org.apache.lucene.document.Field |
getCompletionField(ContextMapping.Context ctx,
String input,
org.apache.lucene.util.BytesRef payload) |
org.apache.lucene.document.Field |
getCompletionField(String input,
org.apache.lucene.util.BytesRef payload) |
SortedMap<String,ContextMapping> |
getContextMapping()
Get the context mapping associated with this completion field.
|
boolean |
hasDocValues() |
static boolean |
isReservedChar(char character) |
boolean |
isSortable() |
boolean |
isStoringPayloads() |
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. |
PostingsFormatProvider |
postingsFormatProvider() |
boolean |
requiresContext() |
boolean |
supportsNullValue() |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
String |
value(Object value)
Returns the actual value of the field.
|
boost, close, copyTo, customBoost, defaultDocValuesFormat, defaultPostingFormat, docValuesFormatProvider, doXContentBody, fieldDataTermsFilter, fieldDataType, fieldType, fuzzyQuery, indexAnalyzer, indexedValueForSearch, indexOptionToString, indexTokenizeOptionToString, isGenerated, isNumeric, name, names, normsLoading, nullValueFilter, prefixFilter, prefixQuery, queryStringTermQuery, rangeFilter, rangeQuery, regexpFilter, regexpQuery, searchAnalyzer, searchQuoteAnalyzer, similarity, stats, termFilter, termQuery, termsFilter, termVectorOptionsToString, traverse, traverse, useTermQueryWithQueryString, valueForSearchpublic static final String CONTENT_TYPE
public CompletionFieldMapper(FieldMapper.Names names, NamedAnalyzer indexAnalyzer, NamedAnalyzer searchAnalyzer, PostingsFormatProvider postingsProvider, SimilarityProvider similarity, boolean payloads, boolean preserveSeparators, boolean preservePositionIncrements, int maxInputLength, AbstractFieldMapper.MultiFields multiFields, AbstractFieldMapper.CopyTo copyTo, SortedMap<String,ContextMapping> contextMappings)
contextMappings - Configuration of context type. If none should be used set ContextMapping.EMPTY_MAPPINGpublic PostingsFormatProvider postingsFormatProvider()
postingsFormatProvider in interface FieldMapper<String>postingsFormatProvider in class AbstractFieldMapper<String>public void parse(ParseContext context) throws IOException
parse in interface Mapperparse in class AbstractFieldMapper<String>IOExceptionpublic SortedMap<String,ContextMapping> getContextMapping()
public boolean requiresContext()
public org.apache.lucene.document.Field getCompletionField(String input, org.apache.lucene.util.BytesRef payload)
public org.apache.lucene.document.Field getCompletionField(ContextMapping.Context ctx, String input, org.apache.lucene.util.BytesRef payload)
public static int correctSubStringLen(String input, int len)
public org.apache.lucene.util.BytesRef buildPayload(org.apache.lucene.util.BytesRef surfaceForm,
long weight,
org.apache.lucene.util.BytesRef payload)
throws IOException
IOExceptionpublic XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent in interface ToXContenttoXContent in class AbstractFieldMapper<String>IOExceptionprotected void parseCreateField(ParseContext context, List<org.apache.lucene.document.Field> fields) throws IOException
AbstractFieldMapperfields.parseCreateField in class AbstractFieldMapper<String>IOExceptionprotected String contentType()
contentType in class AbstractFieldMapper<String>public boolean isSortable()
isSortable in interface FieldMapper<String>isSortable in class AbstractFieldMapper<String>public boolean hasDocValues()
hasDocValues in interface FieldMapper<String>hasDocValues in class AbstractFieldMapper<String>public boolean supportsNullValue()
supportsNullValue in interface FieldMapper<String>supportsNullValue in class AbstractFieldMapper<String>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)
FieldMapperpublic boolean isStoringPayloads()
public void merge(Mapper mergeWith, MergeContext mergeContext) throws MergeMappingException
merge in interface Mappermerge in class AbstractFieldMapper<String>MergeMappingExceptionpublic static boolean isReservedChar(char character)
Copyright © 2009–2016. All rights reserved.