Class NestedValueFetcher

java.lang.Object
org.elasticsearch.index.mapper.NestedValueFetcher
All Implemented Interfaces:
ValueFetcher

public class NestedValueFetcher
extends java.lang.Object
implements ValueFetcher
  • Constructor Summary

    Constructors
    Constructor Description
    NestedValueFetcher​(java.lang.String nestedField, FieldFetcher nestedFieldFetcher)  
  • Method Summary

    Modifier and Type Method Description
    java.util.List<java.lang.Object> fetchValues​(SourceLookup lookup)
    Given access to a document's _source, return this field's values.
    void setNextReader​(org.apache.lucene.index.LeafReaderContext context)
    Update the leaf reader used to fetch values.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NestedValueFetcher

      public NestedValueFetcher​(java.lang.String nestedField, FieldFetcher nestedFieldFetcher)
  • Method Details

    • fetchValues

      public java.util.List<java.lang.Object> fetchValues​(SourceLookup lookup) throws java.io.IOException
      Description copied from interface: ValueFetcher
      Given access to a document's _source, return this field's values. In addition to pulling out the values, they will be parsed into a standard form. For example numeric field mappers make sure to parse the source value into a number of the right type. Note that for array values, the order in which values are returned is undefined and should not be relied on.
      Specified by:
      fetchValues in interface ValueFetcher
      Parameters:
      lookup - a lookup structure over the document's source.
      Returns:
      a list a standardized field values.
      Throws:
      java.io.IOException
    • setNextReader

      public void setNextReader​(org.apache.lucene.index.LeafReaderContext context)
      Description copied from interface: ValueFetcher
      Update the leaf reader used to fetch values.
      Specified by:
      setNextReader in interface ValueFetcher