Class UnmappedFieldFetcher

java.lang.Object
org.elasticsearch.search.fetch.subphase.UnmappedFieldFetcher

public class UnmappedFieldFetcher extends Object
Class to fetch all unmapped fields from a Source that match a set of patterns Takes a set of mapped fields to ignore when matching, which should include any nested mappers.
  • Field Details

  • Constructor Details

    • UnmappedFieldFetcher

      public UnmappedFieldFetcher(Set<String> mappedFields, List<String> nestedChildren, List<String> unmappedFetchPatterns)
      Builds an UnmappedFieldFetcher
      Parameters:
      mappedFields - a set of fields to ignore when iterating through the map
      unmappedFetchPatterns - a set of patterns to match unmapped fields in the source against
  • Method Details

    • collectUnmapped

      public void collectUnmapped(Map<String,DocumentField> documentFields, Source source)
      Collect unmapped fields from a Source
      Parameters:
      documentFields - a map to receive unmapped field values as DocumentFields
      source - the Source