Annotation Interface SourceFilters


@Retention(RUNTIME) @Target({METHOD,ANNOTATION_TYPE}) @Documented public @interface SourceFilters
This annotation can be placed on repository methods to define the properties that should be requested from Elasticsearch when the method is run.
Since:
5.0
Author:
Alexander Torres, Peter-Josef Meisch
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Properties to be requested from Elasticsearch to be excluded in the response.
    Properties to be requested from Elasticsearch to be included in the response.
  • Element Details

    • includes

      String[] includes
      Properties to be requested from Elasticsearch to be included in the response. These can be passed in as literals like
       @SourceFilters(includes = {"property1", "property2"})
       
      or as a parameterized value
       @SourceFilters(includes = "?0")
       
      when the list of properties is passed as a function parameter.
      Default:
      {""}
    • excludes

      String[] excludes
      Properties to be requested from Elasticsearch to be excluded in the response. These can be passed in as literals like
       @SourceFilters(excludes = {"property1", "property2"})
       
      or as a parameterized value
       @SourceFilters(excludes = "?0")
       
      when the list of properties is passed as a function parameter.
      Default:
      {""}