Module org.elasticsearch.server
Package org.elasticsearch.index.mapper
Class SortedNumericDocValuesSyntheticFieldLoader
java.lang.Object
org.elasticsearch.index.mapper.SortedNumericDocValuesSyntheticFieldLoader
- All Implemented Interfaces:
SourceLoader.SyntheticFieldLoader
public abstract class SortedNumericDocValuesSyntheticFieldLoader
extends Object
implements SourceLoader.SyntheticFieldLoader
Load
_source
fields from SortedNumericDocValues
.-
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
ConstructorsModifierConstructorDescriptionprotected
SortedNumericDocValuesSyntheticFieldLoader
(String name, String simpleName) -
Method Summary
Modifier and TypeMethodDescriptiondocValuesLoader
(org.apache.lucene.index.LeafReader reader, int[] docIdsInLeaf) Build something to load doc values for this field or returnnull
if there are no doc values for this field to load.static org.apache.lucene.index.SortedNumericDocValues
docValuesOrNull
(org.apache.lucene.index.LeafReader reader, String fieldName) Returns aSortedNumericDocValues
or null if it doesn't have any doc values.boolean
hasValue()
AStream
mapping stored field paths to a place to put them so they can be included in the next document.void
Write values for this document.protected abstract void
writeValue
(XContentBuilder b, long value)
-
Constructor Details
-
SortedNumericDocValuesSyntheticFieldLoader
-
-
Method Details
-
writeValue
- Throws:
IOException
-
storedFieldLoaders
public Stream<Map.Entry<String,SourceLoader.SyntheticFieldLoader.StoredFieldLoader>> storedFieldLoaders()Description copied from interface:SourceLoader.SyntheticFieldLoader
AStream
mapping stored field paths to a place to put them so they can be included in the next document.- Specified by:
storedFieldLoaders
in interfaceSourceLoader.SyntheticFieldLoader
-
docValuesLoader
public SourceLoader.SyntheticFieldLoader.DocValuesLoader docValuesLoader(org.apache.lucene.index.LeafReader reader, int[] docIdsInLeaf) throws IOException Description copied from interface:SourceLoader.SyntheticFieldLoader
Build something to load doc values for this field or returnnull
if there are no doc values for this field to load.- Specified by:
docValuesLoader
in interfaceSourceLoader.SyntheticFieldLoader
- Throws:
IOException
-
hasValue
public boolean hasValue()- Specified by:
hasValue
in interfaceSourceLoader.SyntheticFieldLoader
-
write
Description copied from interface:SourceLoader.SyntheticFieldLoader
Write values for this document.- Specified by:
write
in interfaceSourceLoader.SyntheticFieldLoader
- Throws:
IOException
-
docValuesOrNull
public static org.apache.lucene.index.SortedNumericDocValues docValuesOrNull(org.apache.lucene.index.LeafReader reader, String fieldName) throws IOException Returns aSortedNumericDocValues
or null if it doesn't have any doc values. SeeDocValues.getSortedNumeric(org.apache.lucene.index.LeafReader, java.lang.String)
which is *nearly* the same, but it returns an "empty" implementation if there aren't any doc values. We need to be able to tell if there aren't any and return our empty leaf source loader.- Throws:
IOException
-