-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support _source_excludes,_source_includes in ES API (#4572)
* support _source_excludes,_source_includes in ES API * handle nested paths
- Loading branch information
Showing
2 changed files
with
321 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
quickwit/rest-api-tests/scenarii/es_compatibility/0022-source.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
--- # _source_excludes | ||
params: | ||
_source_excludes: ["actor"] | ||
json: | ||
size: 1 | ||
query: | ||
match_all: {} | ||
expected: | ||
hits: | ||
total: | ||
value: 100 | ||
relation: eq | ||
hits: | ||
- _source: | ||
$expect: "not 'actor' in val" | ||
--- # _source_includes | ||
params: | ||
_source_includes: ["actor"] | ||
json: | ||
size: 1 | ||
query: | ||
match_all: {} | ||
expected: | ||
hits: | ||
total: | ||
value: 100 | ||
relation: eq | ||
hits: | ||
- _source: | ||
$expect: "len(val) == 1" # Contains only 'actor' | ||
actor: | ||
id: 5688 | ||
--- # _source_includes and _source_excludes | ||
params: | ||
_source_includes: "actor,id" | ||
_source_excludes: ["actor"] | ||
json: | ||
size: 1 | ||
query: | ||
match_all: {} | ||
expected: | ||
hits: | ||
total: | ||
value: 100 | ||
relation: eq | ||
hits: | ||
- _source: | ||
$expect: "len(val) == 1" # Contains only 'actor' | ||
id: 5688 | ||
--- # _source_includes with path | ||
params: | ||
_source_includes: "actor.id" | ||
json: | ||
size: 1 | ||
query: | ||
match_all: {} | ||
expected: | ||
hits: | ||
total: | ||
value: 100 | ||
relation: eq | ||
hits: | ||
- _source: | ||
actor: | ||
$expect: "len(val) == 1" # Contains only 'actor' | ||
id: 5688 | ||
|