Module org.elasticsearch.server
Package org.elasticsearch.index.mapper
Class KeywordFieldMapper.BytesSyntheticFieldLoader
java.lang.Object
org.elasticsearch.index.mapper.KeywordFieldMapper.BytesSyntheticFieldLoader
- All Implemented Interfaces:
SourceLoader.SyntheticFieldLoader
- Enclosing class:
- KeywordFieldMapper
public abstract static class KeywordFieldMapper.BytesSyntheticFieldLoader
extends Object
implements SourceLoader.SyntheticFieldLoader
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.index.mapper.SourceLoader.SyntheticFieldLoader
SourceLoader.SyntheticFieldLoader.Leaf
-
Field Summary
Fields inherited from interface org.elasticsearch.index.mapper.SourceLoader.SyntheticFieldLoader
NOTHING, NOTHING_LEAF
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract org.apache.lucene.util.BytesRef
convert
(org.apache.lucene.util.BytesRef value) Convert aBytesRef
read from the source into bytes to write to the xcontent.leaf
(org.apache.lucene.index.LeafReader reader, int[] docIdsInLeaf) Build a loader for this field in the provided segment.protected abstract org.apache.lucene.util.BytesRef
preserve
(org.apache.lucene.util.BytesRef value) Preservesbytes
returned byconvert(org.apache.lucene.util.BytesRef)
to by written later.
-
Constructor Details
-
BytesSyntheticFieldLoader
-
-
Method Details
-
leaf
public SourceLoader.SyntheticFieldLoader.Leaf leaf(org.apache.lucene.index.LeafReader reader, int[] docIdsInLeaf) throws IOException Description copied from interface:SourceLoader.SyntheticFieldLoader
Build a loader for this field in the provided segment.- Specified by:
leaf
in interfaceSourceLoader.SyntheticFieldLoader
- Throws:
IOException
-
convert
protected abstract org.apache.lucene.util.BytesRef convert(org.apache.lucene.util.BytesRef value) Convert aBytesRef
read from the source into bytes to write to the xcontent. This shouldn't make a deep copy if the conversion process itself doesn't require one. -
preserve
protected abstract org.apache.lucene.util.BytesRef preserve(org.apache.lucene.util.BytesRef value) Preservesbytes
returned byconvert(org.apache.lucene.util.BytesRef)
to by written later. This should make adeep copy
ifconvert(org.apache.lucene.util.BytesRef)
didn't.
-