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.MultiFields
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 |
copyTo, defaultFieldType, fieldType, indexCreatedBefore2x, multiFields
EMPTY_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, updateFieldType
simpleName
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public 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 FieldMapper
public Mapper parse(ParseContext context) throws IOException
parse
in class FieldMapper
IOException
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 FieldMapper
IOException
protected void parseCreateField(ParseContext context, List<org.apache.lucene.document.Field> fields) throws IOException
FieldMapper
fields
.parseCreateField
in class FieldMapper
IOException
protected 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)
Copyright © 2009–2016. All rights reserved.