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.MultiFields
FieldMapper.Loading, FieldMapper.Names
Mapper.BuilderContext
ToXContent.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, similarity
DOC_VALUES_FORMAT
EMPTY_ARRAY
EMPTY_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, termFilter, termQuery, termsFilter, termVectorOptionsToString, traverse, traverse, useTermQueryWithQueryString, valueForSearch
public 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_MAPPING
public PostingsFormatProvider postingsFormatProvider()
postingsFormatProvider
in interface FieldMapper<String>
postingsFormatProvider
in class AbstractFieldMapper<String>
public void parse(ParseContext context) throws IOException
parse
in interface Mapper
parse
in class AbstractFieldMapper<String>
IOException
public 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
IOException
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent
in interface ToXContent
toXContent
in class AbstractFieldMapper<String>
IOException
protected void parseCreateField(ParseContext context, List<org.apache.lucene.document.Field> fields) throws IOException
AbstractFieldMapper
fields
.parseCreateField
in class AbstractFieldMapper<String>
IOException
protected 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)
FieldMapper
public boolean isStoringPayloads()
public void merge(Mapper mergeWith, MergeContext mergeContext) throws MergeMappingException
merge
in interface Mapper
merge
in class AbstractFieldMapper<String>
MergeMappingException
public static boolean isReservedChar(char character)
Copyright © 2009–2015. All rights reserved.