public class CompletionFieldMapper extends FieldMapper
| Modifier and Type | Class and Description |
|---|---|
static class |
CompletionFieldMapper.Builder |
static class |
CompletionFieldMapper.CompletionFieldType |
static class |
CompletionFieldMapper.Defaults |
static class |
CompletionFieldMapper.Fields |
static class |
CompletionFieldMapper.TypeParser |
FieldMapper.CopyTo, FieldMapper.MultiFieldsMapper.BuilderContextToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params| Modifier and Type | Field and Description |
|---|---|
static Set<String> |
ALLOWED_CONTENT_FIELD_NAMES |
static String |
CONTENT_TYPE |
copyTo, defaultFieldType, fieldType, indexCreatedBefore2x, multiFieldsEMPTY_PARAMS| Constructor and Description |
|---|
CompletionFieldMapper(String simpleName,
MappedFieldType fieldType,
int maxInputLength,
Settings indexSettings,
FieldMapper.MultiFields multiFields,
FieldMapper.CopyTo copyTo) |
| 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) |
protected void |
doMerge(Mapper mergeWith,
boolean updateAllTypes)
Merge changes coming from
mergeWith in place. |
CompletionFieldMapper.CompletionFieldType |
fieldType() |
org.apache.lucene.document.Field |
getCompletionField(ContextMapping.Context ctx,
String input,
org.apache.lucene.util.BytesRef payload) |
static boolean |
isReservedChar(char character) |
boolean |
isStoringPayloads() |
Mapper |
parse(ParseContext context)
Parses and indexes inputs
Parsing:
Acceptable format:
"STRING" - interpreted as field value (input)
"ARRAY" - each element can be one of "OBJECT" (see below)
"OBJECT" - { "input": STRING|ARRAY, "weight": STRING|INT, "contexts": ARRAY|OBJECT }
|
protected void |
parseCreateField(ParseContext context,
List<org.apache.lucene.document.Field> fields)
Parse the field value and populate
fields. |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
clone, copyTo, customBoost, doXContentAnalyzers, doXContentBody, doXContentDocValues, hasCustomFieldDataSettings, indexOptionToString, indexTokenizeOptionToString, isGenerated, iterator, merge, name, termVectorOptionsToString, updateFieldTypesimpleNamepublic static final String CONTENT_TYPE
public CompletionFieldMapper(String simpleName, MappedFieldType fieldType, int maxInputLength, Settings indexSettings, FieldMapper.MultiFields multiFields, FieldMapper.CopyTo copyTo)
public CompletionFieldMapper.CompletionFieldType fieldType()
fieldType in class FieldMapperpublic Mapper parse(ParseContext context) throws IOException
parse in class FieldMapperIOExceptionpublic 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 FieldMapperIOExceptionprotected void parseCreateField(ParseContext context, List<org.apache.lucene.document.Field> fields) throws IOException
FieldMapperfields.parseCreateField in class FieldMapperIOExceptionprotected String contentType()
contentType in class FieldMapperpublic boolean isStoringPayloads()
protected void doMerge(Mapper mergeWith, boolean updateAllTypes)
FieldMappermergeWith in place.doMerge in class FieldMapperupdateAllTypes - TODOpublic static boolean isReservedChar(char character)
Copyright © 2009–2017. All rights reserved.