Class FieldFetcher
java.lang.Object
org.elasticsearch.search.fetch.subphase.FieldFetcher
public class FieldFetcher
extends java.lang.Object
A helper class to
FetchFieldsPhase
that's initialized with a list of field patterns to fetch.
Then given a specific document, it can retrieve the corresponding fields from the document's source.-
Method Summary
Modifier and Type Method Description static FieldFetcher
create(SearchExecutionContext context, java.util.Collection<FieldAndFormat> fieldAndFormats)
java.util.Map<java.lang.String,DocumentField>
fetch(SourceLookup sourceLookup)
void
setNextReader(org.apache.lucene.index.LeafReaderContext readerContext)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
create
public static FieldFetcher create(SearchExecutionContext context, java.util.Collection<FieldAndFormat> fieldAndFormats) -
fetch
public java.util.Map<java.lang.String,DocumentField> fetch(SourceLookup sourceLookup) throws java.io.IOException- Throws:
java.io.IOException
-
setNextReader
public void setNextReader(org.apache.lucene.index.LeafReaderContext readerContext)
-