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 SourceFilter
static SourceFilter
of
(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:SourceFilter
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- Specified by:
fetchSource
in interfaceSourceFilter
-
getIncludes
- Specified by:
getIncludes
in interfaceSourceFilter
- Returns:
- the name of the fields to include in a response.
-
getExcludes
- Specified by:
getExcludes
in interfaceSourceFilter
- Returns:
- the names of the fields to exclude from a response.
-