-
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
Allow passing a default operator to use on saved object client find operations #29339
Allow passing a default operator to use on saved object client find operations #29339
Conversation
Pinging @elastic/kibana-platform |
💚 Build Succeeded |
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.
LGTM from the security perspective. The type/namespace filtering exists in a separate "clause" so it's not affected by the specified search operator.
I have the same solution I made for 6.5 except for I checked that the searchOperator was defined before setting a value on that bool object. Does something else check that? |
I stripped of part of the description, since the |
Spoke with @timroes and confirmed dashboard and visualizations are fixed with the code changes in this PR (they call saved_object_loader behind the scenes). @JacobBrandt I added a fallback to |
Pinging @elastic/kibana-app |
This comment has been minimized.
This comment has been minimized.
💚 Build Succeeded |
src/server/saved_objects/service/lib/search_dsl/query_params.js
Outdated
Show resolved
Hide resolved
…configure-find-operator
💚 Build Succeeded |
Spoke with @spalger and agreed we should rename |
💚 Build Succeeded |
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.
LGTM, code review, thanks!
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.
Tested the usage in saved_object_finder and saved_object_loader and that looks good to me.
…perations (elastic#29339) * Allow passing a default operator to use on find operations * Default operator to OR like elasticsearch to avoid passing null * Add dashboard search tests * Make search_operator optional * Fix query_params.test.js * Include searchOperator in saved_object_finder * Apply PR feedback * Rename searchOperator to defaultSearchOperator
Fixes #29262.
Fixes #20676
Ability to pass in a
default_operator
for a saved object repositoryfind
call.The default operator gets passed to the
simple_query_string
request to Elasticsearch.This changes the default operator in the
saved_object_loader.js
toAND
to make finding dashboards, visualizations, etc easier.