Class SourceFilter

java.lang.Object
org.elasticsearch.search.lookup.SourceFilter

public final class SourceFilter extends Object
Implements source filtering based on a list of included and excluded fields. To use, construct a SourceFilter and pass it to Source.filter(SourceFilter)
  • Constructor Details

    • SourceFilter

      public SourceFilter(String[] includes, String[] excludes)
      Construct a new filter based on a list of includes and excludes
      Parameters:
      includes - an array of fields to include (may be null)
      excludes - an array of fields to exclude (may be null)
  • Method Details

    • filterMap

      public Source filterMap(Source in)
      Filter a Source using its map representation
    • filterBytes

      public Source filterBytes(Source in)
      Filter a Source using its bytes representation