public class CompletionFieldMapper2x extends FieldMapper
| Modifier and Type | Class and Description |
|---|---|
static class |
CompletionFieldMapper2x.Builder |
static class |
CompletionFieldMapper2x.CompletionFieldType |
static class |
CompletionFieldMapper2x.Defaults |
static class |
CompletionFieldMapper2x.Fields |
static class |
CompletionFieldMapper2x.TypeParser |
FieldMapper.CopyTo, FieldMapper.MultiFieldsMapper.BuilderContextToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params| Modifier and Type | Field and Description |
|---|---|
static java.util.Set<java.lang.String> |
ALLOWED_CONTENT_FIELD_NAMES |
static java.lang.String |
CONTENT_TYPE |
COERCE_SETTING, copyTo, defaultFieldType, fieldType, IGNORE_MALFORMED_SETTING, multiFieldsEMPTY_PARAMS| Constructor and Description |
|---|
CompletionFieldMapper2x(java.lang.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 java.lang.String |
contentType() |
static int |
correctSubStringLen(java.lang.String input,
int len) |
protected void |
doMerge(Mapper mergeWith,
boolean updateAllTypes)
Merge changes coming from
mergeWith in place. |
CompletionFieldMapper2x.CompletionFieldType |
fieldType() |
org.apache.lucene.document.Field |
getCompletionField(ContextMapping.Context ctx,
java.lang.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,
java.util.List<org.apache.lucene.index.IndexableField> fields)
Parse the field value and populate
fields. |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
clone, copyTo, customBoost, doXContentAnalyzers, doXContentBody, doXContentDocValues, indexOptionToString, indexTokenizeOption, iterator, merge, name, termVectorOptionsToString, updateFieldTypesimpleNameequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisFragmentpublic static final java.lang.String CONTENT_TYPE
public static final java.util.Set<java.lang.String> ALLOWED_CONTENT_FIELD_NAMES
public CompletionFieldMapper2x(java.lang.String simpleName,
MappedFieldType fieldType,
int maxInputLength,
Settings indexSettings,
FieldMapper.MultiFields multiFields,
FieldMapper.CopyTo copyTo)
public CompletionFieldMapper2x.CompletionFieldType fieldType()
fieldType in class FieldMapperpublic Mapper parse(ParseContext context) throws java.io.IOException
parse in class FieldMapperjava.io.IOExceptionpublic org.apache.lucene.document.Field getCompletionField(ContextMapping.Context ctx, java.lang.String input, org.apache.lucene.util.BytesRef payload)
public static int correctSubStringLen(java.lang.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 java.io.IOException
java.io.IOExceptionpublic XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent in interface ToXContenttoXContent in class FieldMapperjava.io.IOExceptionprotected void parseCreateField(ParseContext context, java.util.List<org.apache.lucene.index.IndexableField> fields) throws java.io.IOException
FieldMapperfields.parseCreateField in class FieldMapperjava.io.IOExceptionprotected java.lang.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)