Module org.elasticsearch.server
Package org.elasticsearch.index.mapper
Class SortedNumericDocValuesSyntheticFieldLoaderLayer
java.lang.Object
org.elasticsearch.index.mapper.SortedNumericDocValuesSyntheticFieldLoaderLayer
- All Implemented Interfaces:
CompositeSyntheticFieldLoader.DocValuesLayer,CompositeSyntheticFieldLoader.Layer,SourceLoader.SyntheticFieldLoader
public class SortedNumericDocValuesSyntheticFieldLoaderLayer
extends Object
implements CompositeSyntheticFieldLoader.DocValuesLayer
A
CompositeSyntheticFieldLoader.DocValuesLayer that loads values 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
ConstructorsConstructorDescriptionSortedNumericDocValuesSyntheticFieldLoaderLayer(String name, SortedNumericWithOffsetsDocValuesSyntheticFieldLoaderLayer.NumericValueWriter valueWriter) -
Method Summary
Modifier and TypeMethodDescriptiondocValuesLoader(org.apache.lucene.index.LeafReader reader, int[] docIdsInLeaf) Build something to load doc values for this field or returnnullif there are no doc values for this field to load.static org.apache.lucene.index.SortedNumericDocValuesdocValuesOrNull(org.apache.lucene.index.LeafReader reader, String fieldName) Returns aSortedNumericDocValuesor null if it doesn't have any doc values.Returns the canonical field name for this loader.booleanhasValue()Has this field loaded any values for this document?longNumber of values that this loader will write for a given document.voidWrite values for this document.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.CompositeSyntheticFieldLoader.DocValuesLayer
reset, storedFieldLoadersMethods inherited from interface org.elasticsearch.index.mapper.SourceLoader.SyntheticFieldLoader
prepare, setIgnoredValues
-
Constructor Details
-
SortedNumericDocValuesSyntheticFieldLoaderLayer
public SortedNumericDocValuesSyntheticFieldLoaderLayer(String name, SortedNumericWithOffsetsDocValuesSyntheticFieldLoaderLayer.NumericValueWriter valueWriter)
-
-
Method Details
-
fieldName
Description copied from interface:SourceLoader.SyntheticFieldLoaderReturns the canonical field name for this loader.- Specified by:
fieldNamein interfaceSourceLoader.SyntheticFieldLoader
-
docValuesLoader
public SourceLoader.SyntheticFieldLoader.DocValuesLoader docValuesLoader(org.apache.lucene.index.LeafReader reader, 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
-
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:
-
write
Description copied from interface:SourceLoader.SyntheticFieldLoaderWrite values for this document.- Specified by:
writein interfaceSourceLoader.SyntheticFieldLoader- Throws:
IOException
-
docValuesOrNull
public static org.apache.lucene.index.SortedNumericDocValues docValuesOrNull(org.apache.lucene.index.LeafReader reader, String fieldName) throws IOException Returns aSortedNumericDocValuesor 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
-