ToXContent, ToXContentFragmentpublic class SeqNoFieldMapper extends MetadataFieldMapper
_seq_no field.
We expect to use the seq# for sorting, during collision checking and for
doing range searches. Therefore the _seq_no field is stored both
as a numeric doc value and as numeric indexed field.
This mapper also manages the primary term field, which has no ES named
equivalent. The primary term is only used during collision after receiving
identical seq# values for two document copies. The primary term is stored as
a doc value field without being indexed, since it is only intended for use
as a key-value lookup.| Modifier and Type | Class | Description |
|---|---|---|
static class |
SeqNoFieldMapper.Builder |
|
static class |
SeqNoFieldMapper.SeqNoDefaults |
|
static class |
SeqNoFieldMapper.SequenceIDFields |
A sequence ID, which is made up of a sequence number (both the searchable
and doc_value version of the field) and the primary term.
|
static class |
SeqNoFieldMapper.TypeParser |
FieldMapper.CopyTo, FieldMapper.MultiFieldsMapper.BuilderContextToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
CONTENT_TYPE |
|
static java.lang.String |
NAME |
|
static java.lang.String |
PRIMARY_TERM_NAME |
COERCE_SETTING, copyTo, defaultFieldType, fieldType, IGNORE_MALFORMED_SETTING, indexCreatedVersion, multiFieldsEMPTY_PARAMS| Constructor | Description |
|---|---|
SeqNoFieldMapper(Settings indexSettings) |
| Modifier and Type | Method | Description |
|---|---|---|
protected java.lang.String |
contentType() |
|
protected void |
doMerge(Mapper mergeWith,
boolean updateAllTypes) |
Merge changes coming from
mergeWith in place. |
Mapper |
parse(ParseContext context) |
Parse using the provided
ParseContext and return a mapping
update if dynamic mappings modified the mappings, or null if
mappings were not modified. |
protected void |
parseCreateField(ParseContext context,
java.util.List<org.apache.lucene.index.IndexableField> fields) |
Parse the field value and populate
fields. |
void |
postParse(ParseContext context) |
Called after
FieldMapper.parse(ParseContext) on the RootObjectMapper. |
void |
preParse(ParseContext context) |
Called before
FieldMapper.parse(ParseContext) on the RootObjectMapper. |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
clone, copyTo, createFieldNamesField, doXContentAnalyzers, doXContentBody, doXContentDocValues, fieldType, indexOptionToString, indexTokenizeOption, iterator, name, termVectorOptionsToString, updateFieldTypesimpleNamemergeequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisFragmentpublic static final java.lang.String NAME
public static final java.lang.String CONTENT_TYPE
public static final java.lang.String PRIMARY_TERM_NAME
public SeqNoFieldMapper(Settings indexSettings)
public void preParse(ParseContext context) throws java.io.IOException
MetadataFieldMapperFieldMapper.parse(ParseContext) on the RootObjectMapper.preParse in class MetadataFieldMapperjava.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.IOExceptionpublic Mapper parse(ParseContext context) throws java.io.IOException
FieldMapperParseContext and return a mapping
update if dynamic mappings modified the mappings, or null if
mappings were not modified.parse in class FieldMapperjava.io.IOExceptionpublic void postParse(ParseContext context) throws java.io.IOException
MetadataFieldMapperFieldMapper.parse(ParseContext) on the RootObjectMapper.postParse in class MetadataFieldMapperjava.io.IOExceptionprotected java.lang.String contentType()
contentType in class FieldMapperpublic XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent in interface ToXContenttoXContent in class FieldMapperjava.io.IOExceptionprotected void doMerge(Mapper mergeWith, boolean updateAllTypes)
FieldMappermergeWith in place.doMerge in class FieldMapperupdateAllTypes - TODO