Module spring.data.elasticsearch
Class FetchSourceFilter
java.lang.Object
org.springframework.data.elasticsearch.core.query.FetchSourceFilter
- All Implemented Interfaces:
SourceFilter
SourceFilter implementation for providing includes and excludes.
- Author:
- Jon Tsiros, Peter-Josef Meisch
-
Constructor Summary
ConstructorsConstructorDescriptionFetchSourceFilter(Boolean fetchSource, String[] includes, String[] excludes) -
Method Summary
Modifier and TypeMethodDescriptionFlag to set the _source parameter in a query to true or false.String[]String[]static SourceFilterstatic SourceFilterof(Function<FetchSourceFilterBuilder, FetchSourceFilterBuilder> builderFunction)
-
Constructor Details
-
FetchSourceFilter
-
-
Method Details
-
of
public static SourceFilter of(@Nullable Boolean fetchSource, @Nullable String[] includes, @Nullable String[] excludes) - Since:
- 5.2
-
of
public static SourceFilter of(Function<FetchSourceFilterBuilder, FetchSourceFilterBuilder> builderFunction) - Since:
- 5.2
-
fetchSource
Description copied from interface:SourceFilterFlag 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- Specified by:
fetchSourcein interfaceSourceFilter
-
getIncludes
- Specified by:
getIncludesin interfaceSourceFilter- Returns:
- the name of the fields to include in a response.
-
getExcludes
- Specified by:
getExcludesin interfaceSourceFilter- Returns:
- the names of the fields to exclude from a response.
-