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.MultiFields
Mapper.BuilderContext
ToXContent.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, indexCreatedVersion, multiFields
EMPTY_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, updateFieldType
simpleName
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isFragment
public 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 FieldMapper
public Mapper parse(ParseContext context) throws java.io.IOException
parse
in class FieldMapper
java.io.IOException
public 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.IOException
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent
in interface ToXContent
toXContent
in class FieldMapper
java.io.IOException
protected void parseCreateField(ParseContext context, java.util.List<org.apache.lucene.index.IndexableField> fields) throws java.io.IOException
FieldMapper
fields
.parseCreateField
in class FieldMapper
java.io.IOException
protected java.lang.String contentType()
contentType
in class FieldMapper
public boolean isStoringPayloads()
protected void doMerge(Mapper mergeWith, boolean updateAllTypes)
FieldMapper
mergeWith
in place.doMerge
in class FieldMapper
updateAllTypes
- TODOpublic static boolean isReservedChar(char character)