java.lang.Object
org.elasticsearch.search.lookup.SourceFilter
Implements source filtering based on a list of included and excluded fields. To use,
construct a SourceFilter and pass it to
Source.filter(SourceFilter)-
Constructor Summary
ConstructorsConstructorDescriptionSourceFilter(String[] includes, String[] excludes) Construct a new filter based on a list of includes and excludes -
Method Summary
Modifier and TypeMethodDescriptionbooleanfilterBytes(Source in) Filter a Source using its bytes representationFilter a Source using its map representationString[]String[]booleanisPathFiltered(String fullPath, boolean isObject) Determines whether the given full path should be filtered out.
-
Constructor Details
-
SourceFilter
Construct a new filter based on a list of includes and excludes- Parameters:
includes- an array of fields to include (may be null)excludes- an array of fields to exclude (may be null)
-
-
Method Details
-
getIncludes
-
getExcludes
-
isPathFiltered
Determines whether the given full path should be filtered out.- Parameters:
fullPath- The full path to evaluate.isObject- Indicates if the path represents an object.- Returns:
trueif the path should be filtered out,falseotherwise.
-
filterMap
Filter a Source using its map representation -
filterBytes
Filter a Source using its bytes representation -
excludesAll
public boolean excludesAll()
-