Module org.elasticsearch.server
Class StoredFieldLoader
java.lang.Object
org.elasticsearch.index.fieldvisitor.StoredFieldLoader
Generates a
LeafStoredFieldLoader
for a given lucene segment to load stored fields.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic StoredFieldLoader
Creates a new StoredFieldLoaderstatic StoredFieldLoader
empty()
Creates a no-op StoredFieldLoader that will not load any fields from diskabstract LeafStoredFieldLoader
getLoader
(org.apache.lucene.index.LeafReaderContext ctx, int[] docs) Return aLeafStoredFieldLoader
for the given segment and document set The loader will use an internal lucene merge reader if the document set is of sufficient size and is contiguous.
-
Constructor Details
-
StoredFieldLoader
public StoredFieldLoader()
-
-
Method Details
-
getLoader
public abstract LeafStoredFieldLoader getLoader(org.apache.lucene.index.LeafReaderContext ctx, int[] docs) Return aLeafStoredFieldLoader
for the given segment and document set The loader will use an internal lucene merge reader if the document set is of sufficient size and is contiguous. Callers may passnull
if the set is not known up front or if the merge reader optimisation will not apply. -
fieldsToLoad
- Returns:
- a list of fields that will be loaded for each document
-
create
Creates a new StoredFieldLoader- Parameters:
loadSource
- should this loader load the _source fieldfields
- a set of additional fields the loader should load
-
empty
Creates a no-op StoredFieldLoader that will not load any fields from disk
-