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 Summary

    Modifier and Type
    Method
    Description
    default @Nullable Boolean
    Flag to set the _source parameter in a query to true or false.
    String @Nullable []
     
    String @Nullable []
     
  • Method Details

    • getIncludes

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

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

      default @Nullable 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