Module org.elasticsearch.server
Package org.elasticsearch.index.mapper
Class CompositeSyntheticFieldLoader.StoredFieldLayer
java.lang.Object
org.elasticsearch.index.mapper.CompositeSyntheticFieldLoader.StoredFieldLayer
- All Implemented Interfaces:
CompositeSyntheticFieldLoader.Layer,SourceLoader.SyntheticFieldLoader
- Direct Known Subclasses:
CompositeSyntheticFieldLoader.MalformedValuesLayer
- Enclosing class:
CompositeSyntheticFieldLoader
public abstract static class CompositeSyntheticFieldLoader.StoredFieldLayer
extends Object
implements CompositeSyntheticFieldLoader.Layer
Layer that loads field values from a provided stored field.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.index.mapper.SourceLoader.SyntheticFieldLoader
SourceLoader.SyntheticFieldLoader.DocValuesLoader, SourceLoader.SyntheticFieldLoader.StoredFieldLoader -
Field Summary
Fields inherited from interface org.elasticsearch.index.mapper.SourceLoader.SyntheticFieldLoader
NOTHING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondocValuesLoader(org.apache.lucene.index.LeafReader leafReader, int[] docIdsInLeaf) Build something to load doc values for this field or returnnullif there are no doc values for this field to load.Returns the canonical field name for this loader.booleanhasValue()Has this field loaded any values for this document?voidreset()Resets the loader to remove any stored data and prepare it for processing new document.AStreammapping stored field paths to a place to put them so they can be included in the next document.longNumber of values that this loader will write for a given document.voidWrite values for this document.protected abstract voidwriteValue(Object value, XContentBuilder b) Write a value read from stored field using appropriate format.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.index.mapper.SourceLoader.SyntheticFieldLoader
prepare, setIgnoredValues
-
Constructor Details
-
StoredFieldLayer
-
-
Method Details
-
valueCount
public long valueCount()Description copied from interface:CompositeSyntheticFieldLoader.LayerNumber of values that this loader will write for a given document.- Specified by:
valueCountin interfaceCompositeSyntheticFieldLoader.Layer- Returns:
-
storedFieldLoaders
public Stream<Map.Entry<String,SourceLoader.SyntheticFieldLoader.StoredFieldLoader>> storedFieldLoaders()Description copied from interface:SourceLoader.SyntheticFieldLoaderAStreammapping stored field paths to a place to put them so they can be included in the next document.- Specified by:
storedFieldLoadersin interfaceSourceLoader.SyntheticFieldLoader
-
docValuesLoader
public SourceLoader.SyntheticFieldLoader.DocValuesLoader docValuesLoader(org.apache.lucene.index.LeafReader leafReader, int[] docIdsInLeaf) throws IOException Description copied from interface:SourceLoader.SyntheticFieldLoaderBuild something to load doc values for this field or returnnullif there are no doc values for this field to load.- Specified by:
docValuesLoaderin interfaceSourceLoader.SyntheticFieldLoader- Parameters:
docIdsInLeaf- can be null.- Throws:
IOException
-
hasValue
public boolean hasValue()Description copied from interface:SourceLoader.SyntheticFieldLoaderHas this field loaded any values for this document?- Specified by:
hasValuein interfaceSourceLoader.SyntheticFieldLoader
-
write
Description copied from interface:SourceLoader.SyntheticFieldLoaderWrite values for this document.- Specified by:
writein interfaceSourceLoader.SyntheticFieldLoader- Throws:
IOException
-
reset
public void reset()Description copied from interface:SourceLoader.SyntheticFieldLoaderResets the loader to remove any stored data and prepare it for processing new document. This is an alternative code path toSourceLoader.SyntheticFieldLoader.write(org.elasticsearch.xcontent.XContentBuilder)that is executed when values are loaded but not written. Loaders are expected to also reset their state after writing currently present data.- Specified by:
resetin interfaceSourceLoader.SyntheticFieldLoader
-
writeValue
Write a value read from stored field using appropriate format.- Throws:
IOException
-
fieldName
Description copied from interface:SourceLoader.SyntheticFieldLoaderReturns the canonical field name for this loader.- Specified by:
fieldNamein interfaceSourceLoader.SyntheticFieldLoader
-