-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SavedObjectClient] Add support to exclude references when searching #142479
[SavedObjectClient] Add support to exclude references when searching #142479
Conversation
Pinging @elastic/kibana-core (Team:Core) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looking good.
Just have a point to clarify before approval: #142479 (comment)
...core/saved-objects/core-saved-objects-api-server-internal/src/lib/search_dsl/query_params.ts
Outdated
Show resolved
Hide resolved
...saved-objects/core-saved-objects-api-server-internal/src/lib/search_dsl/query_params.test.ts
Show resolved
Hide resolved
...saved-objects/core-saved-objects-api-server-internal/src/lib/search_dsl/references_filter.ts
Outdated
Show resolved
Hide resolved
/** | ||
* The operator to use when searching by multiple references using the `hasNoReference` option. Defaults to `OR` | ||
*/ | ||
hasNoReferenceOperator?: 'AND' | 'OR'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note for later:
Line 131 in 34c228b
export type SearchOperator = 'AND' | 'OR'; |
Should be extracted to @kbn/core-saved-objects-api-server
Thanks for the review @pgayvallet ! I addressed your comments, can you have another look? Cheers! |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Page load bundle
Unknown metric groupsAPI count
History
To update your PR or re-run it, just comment with: cc @sebelga |
As part of the UX improvement of the
<TableListView />
component we want to allow the user to filter in/out the items with certain tags in the table. For that we need the Saved Object client to accept a list of tag references that must_not be present in the saved object returned.I've added support for both the
OR
(default) andAND
operators.Release note
The saved object client
find()
methods accepts the newhasNoReference
andhasNoReferenceOperator
options to filter out saved object containing certain references.