Interface SourceFilter

All Known Implementing Classes:
FetchSourceFilter

public interface SourceFilter
SourceFilter for providing includes and excludes. Using these helps in reducing the amount of data that is returned from Elasticsearch especially when the stored documents are large and only some fields from these documents are needed. If the SourceFilter includes the name of a property that has a different name mapped in Elasticsearch (see Field.name() this will automatically be mapped.
Author:
Jon Tsiros, Peter-Josef Meisch
  • Method Details

    • getIncludes

      @Nullable String[] getIncludes()
      Returns:
      the name of the fields to include in a response.
    • getExcludes

      @Nullable String[] getExcludes()
      Returns:
      the names of the fields to exclude from a response.
    • fetchSource

      @Nullable default Boolean fetchSource()
      Flag to set the _source parameter in a query to true or false. If this is not null, the values returned from getIncludes() and getExcludes() are ignored
      Since:
      5.5