Module org.elasticsearch.server
Package org.elasticsearch.index.mapper
Class SortedSetDocValuesSyntheticFieldLoaderLayer
java.lang.Object
org.elasticsearch.index.mapper.SortedSetDocValuesSyntheticFieldLoaderLayer
- All Implemented Interfaces:
CompositeSyntheticFieldLoader.DocValuesLayer,CompositeSyntheticFieldLoader.Layer,SourceLoader.SyntheticFieldLoader
public abstract class SortedSetDocValuesSyntheticFieldLoaderLayer
extends Object
implements CompositeSyntheticFieldLoader.DocValuesLayer
Load
_source fields from SortedSetDocValues.-
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
ConstructorsConstructorDescriptionBuild a loader from doc values and, optionally, a stored field. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract org.apache.lucene.util.BytesRefconvert(org.apache.lucene.util.BytesRef value) Convert aBytesRefread from the source into bytes to write to the xcontent.docValuesLoader(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.Returns the canonical field name for this loader.booleanhasValue()Has this field loaded any values for this document?protected abstract org.apache.lucene.util.BytesRefpreserve(org.apache.lucene.util.BytesRef value) Preservesbytesreturned byconvert(org.apache.lucene.util.BytesRef)to by written later.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
-
SortedSetDocValuesSyntheticFieldLoaderLayer
Build a loader from doc values and, optionally, a stored field.- Parameters:
name- the name of the field to load from doc values
-
-
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
-
convert
protected abstract org.apache.lucene.util.BytesRef convert(org.apache.lucene.util.BytesRef value) Convert aBytesRefread 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) Preservesbytesreturned byconvert(org.apache.lucene.util.BytesRef)to by written later. This should make adeep copyifconvert(org.apache.lucene.util.BytesRef)didn't.
-