-
Notifications
You must be signed in to change notification settings - Fork 353
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add extra_filters parameter to ES API (#4585)
add extra_filters to ES API. Useful for permission handling. Closes #4576
- Loading branch information
Showing
4 changed files
with
78 additions
and
4 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
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
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
45 changes: 45 additions & 0 deletions
45
quickwit/rest-api-tests/scenarii/es_compatibility/0023-extra_filters.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,45 @@ | ||
# Extra filters are additional filters that are applied to the query. Useful for permissions and other use cases. | ||
json: | ||
query: | ||
match_all: {} | ||
params: | ||
extra_filters: "type:PushEvent" | ||
expected: | ||
hits: | ||
total: | ||
value: 60 | ||
--- # 2 extra filters | ||
json: | ||
query: | ||
match_all: {} | ||
params: | ||
extra_filters: "type:PushEvent,actor.login:jadonk" | ||
expected: | ||
hits: | ||
total: | ||
value: 2 | ||
--- # Test mixing | ||
json: | ||
query: | ||
query_string: | ||
query: "type:PushEvent" | ||
params: | ||
extra_filters: "actor.login:jadonk" | ||
expected: | ||
hits: | ||
total: | ||
value: 2 | ||
--- # Test mixing | ||
json: | ||
query: | ||
query_string: | ||
query: "type:PushEvent" | ||
params: | ||
extra_filters: "type:PushEvent,actor.login:jadonk" | ||
expected: | ||
hits: | ||
total: | ||
value: 2 | ||
|
||
|
||
|