Module org.elasticsearch.server
Package org.elasticsearch.index.mapper
Class IgnoredSourceFieldMapper.CoalescedIgnoredSourceEncoding
java.lang.Object
org.elasticsearch.index.mapper.IgnoredSourceFieldMapper.CoalescedIgnoredSourceEncoding
- Enclosing class:
IgnoredSourceFieldMapper
Encodes/decodes multiple ignored values for the same field path to/from a
BytesRef blob.
Instead of storing one IgnoredSourceFieldMapper.SingularIgnoredSourceEncoding blob per ignored value, all ignored values for a single field path are
stored together and the field name is written only once.
The blob itself is of the following format: [count][field name][(parent offset, value)*] where:
countis avIntnumber of valuesfield nameis the full field path, written once as astring- each
(parent offset, value)pair contains:parent offsetas avIntoffset intofield namewhere the parent endsvalueas abytesRefencoded byXContentDataHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecode(org.apache.lucene.util.BytesRef value) decodeAsMap(org.apache.lucene.util.BytesRef value) static org.apache.lucene.util.BytesRefencode(List<IgnoredSourceFieldMapper.NameValue> values) static org.apache.lucene.util.BytesRefencodeFromMap(List<IgnoredSourceFieldMapper.MappedNameValue> filteredValues)
-
Constructor Details
-
CoalescedIgnoredSourceEncoding
public CoalescedIgnoredSourceEncoding()
-
-
Method Details
-
encode
public static org.apache.lucene.util.BytesRef encode(List<IgnoredSourceFieldMapper.NameValue> values) -
decode
public static List<IgnoredSourceFieldMapper.NameValue> decode(org.apache.lucene.util.BytesRef value) -
encodeFromMap
public static org.apache.lucene.util.BytesRef encodeFromMap(List<IgnoredSourceFieldMapper.MappedNameValue> filteredValues) throws IOException - Throws:
IOException
-
decodeAsMap
public static List<IgnoredSourceFieldMapper.MappedNameValue> decodeAsMap(org.apache.lucene.util.BytesRef value) throws IOException - Throws:
IOException
-