-
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
use index patterns and search services for autocomplete #92861
Conversation
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 looks good but I think we might want to swap find
with get
const indexPattern = await findIndexPatternById(context.core.savedObjects.client, index); | ||
|
||
const field = indexPattern && getFieldByName(fieldName, indexPattern); | ||
const indexPatterns = await context.indexPatterns.find(index, 1); |
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.
I think you want to use get
instead of find
. find
searches by title, get
uses id
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.
get uses the id
fields, and the index
here is the title
.
@mattkime if so, I think this is not a 7.12 bugfix, but a 7.13 improvement. Would you agree? |
@lizozom agreed. |
@elasticmachine merge upstream |
Pinging @elastic/kibana-app-services (Team:AppServices) |
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.
infra
changes LGTM
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Test FailuresKibana Pipeline / general / X-Pack Spaces API Integration Tests -- security_and_spaces.x-pack/test/spaces_api_integration/security_and_spaces/apis/delete·ts.spaces api with security delete superuser from the space_1 space should return 204 when referencing the space_1 space explicitly in the URLStandard Out
Stack Trace
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @lizozom |
* use index patterns and search services for autocomplete * imports * extend DataRequestHandlerContext * Catch error if index patterns service can't be created. * doc Co-authored-by: Kibana Machine <[email protected]>
) * use index patterns and search services for autocomplete * imports * extend DataRequestHandlerContext * Catch error if index patterns service can't be created. * doc Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Liza Katz <[email protected]>
…)" This reverts commit 2ef7f3b.
…tic#92861)" (elastic#95335) This reverts commit 2ef7f3b.
This was reverted because it doesn't work with index pattern like objects. |
…#92861)" (#95335) (#95360) * Revert "use index patterns and search services for autocomplete (#92861)" (#95335) This reverts commit 2ef7f3b. * es Co-authored-by: Liza Katz <[email protected]> Co-authored-by: Liza K <[email protected]>
Summary
This PR introduces a server side
indexPatterns
context service and uses it in the autocomplete provider.Checklist
Delete any items that are not applicable to this PR.
For maintainers