Skip to content
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

[Search] Unify search plugin step 3 — Rollup search strategy #98122

Closed
wants to merge 11 commits into from

Conversation

Dosant
Copy link
Contributor

@Dosant Dosant commented Apr 23, 2021

Summary

Partially addresses #92802

As part of unifying the search plugin, we agree that we want to move rollup search into a separate search strategy.

Before this PR:

This PR:

  • Split rollups out of async search strategy

Still TODO In separate pr:

  • Move rest of search/session to data (blocked by security and taskManager, at this point teams have no plans to moving them)
  • Update old docs / example plugins / READMEs with information about the new structure

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@Dosant Dosant added Feature:Search Querying infrastructure in Kibana refactoring technical debt Improvement of the software architecture and operational architecture v8.0.0 Team:AppServices release_note:skip Skip the PR/issue when compiling release notes v7.14.0 labels Apr 23, 2021
@Dosant Dosant changed the title [Search] Unify search plugin step 2 — Rollup search strategy [Search] Unify search plugin step 3 — Rollup search strategy Apr 23, 2021
@Dosant Dosant mentioned this pull request Apr 23, 2021
10 tasks
@Dosant Dosant marked this pull request as ready for review April 23, 2021 17:12
@Dosant Dosant requested a review from a team April 23, 2021 17:12
@Dosant Dosant requested a review from a team as a code owner April 23, 2021 17:12
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@Dosant Dosant requested review from lizozom and lukasolson April 23, 2021 17:13
Copy link
Contributor

@lizozom lizozom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall look good.
Added a couple of comments.

@Dosant
Copy link
Contributor Author

Dosant commented Apr 28, 2021

@elasticmachine merge upstream

@Dosant Dosant requested a review from lizozom May 10, 2021 07:51
Copy link
Contributor

@lizozom lizozom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you try viewing a rollup index in discover, it now uses the wrong strategy and fails.
This happens because of the changes introduced by #91517.

See src/plugins/discover/public/application/helpers/update_search_source.ts:57.

@Dosant Dosant marked this pull request as draft May 10, 2021 14:54
@Dosant
Copy link
Contributor Author

Dosant commented May 12, 2021

@lizozom, could take another closer look, please 🙏 I compared behavior with master and it seems to me it is the same.
Could it be a feature in master is broken atm?

If you try viewing a rollup index in discover, it now uses the wrong strategy and fails.
What is the error you see?

@Dosant
Copy link
Contributor Author

Dosant commented May 17, 2021

@elasticmachine merge upstream

@Dosant Dosant requested a review from lizozom May 18, 2021 09:21
# Conflicts:
#	src/plugins/data/server/search/strategies/ese_search/ese_search_strategy.ts
@Dosant Dosant requested a review from kertal May 25, 2021 10:39
@Dosant Dosant marked this pull request as ready for review May 25, 2021 13:22
@kertal
Copy link
Member

kertal commented May 25, 2021

qq: when I'm using a rollup index pattern shouldn't strategy change in the request?
Discover_-_Elastic

@Dosant
Copy link
Contributor Author

Dosant commented May 26, 2021

qq: when I'm using a rollup index pattern shouldn't strategy change in the request?

@kertal, that is the question I wanted to ask you, and also would like @lizozom to double-check (#98122 (review)) 🙏
I am comparing current discover behavior with the main branch and it looks like in the main branch discover isn't sending indexType: 'rollup' inside ese strategy request which is equal to not using 'rollup' search strategy in this branch.

I have very limited knowledge of how that part should work in Discover, but from what I see it look like either this pr works as expected or we have a bug in the main branch.

@kertal
Copy link
Member

kertal commented May 26, 2021

qq: when I'm using a rollup index pattern shouldn't strategy change in the request?

@kertal, that is the question I wanted to ask you, and also would like @lizozom to double-check (#98122 (review)) 🙏
I am comparing current discover behavior with the main branch and it looks like in the main branch discover isn't sending indexType: 'rollup' inside ese strategy request which is equal to not using 'rollup' search strategy in this branch.

I have very limited knowledge of how that part should work in Discover, but from what I see it look like either this pr works as expected or we have a bug in the main branch.

Also not sure about this (tested rollups with this PR and it seemed to work), and you know #96766 is around the corner, which changes tons of stuff here. So the question is, what should be sent, and ideally after #96766 we could adapt it.

@lizozom
Copy link
Contributor

lizozom commented May 30, 2021

@Dosant @kertal #96766 doesn't change anything about setPreferredSearchStrategyId, so I don't think it should matter.
I think as long as there are no regressions when querying rollup indices in discover, we should be ok with this.

Copy link
Contributor

@lizozom lizozom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see #96766 changing the behavior of setPreferredSearchStrategyId, so I don't think these two PRs are related in this sense.
I now understand why discover fetches documnets with the default strategy, regardless of the index type - because it only needs the raw documents, without any aggs.
LGTM!

@lizozom
Copy link
Contributor

lizozom commented May 30, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
data 570 572 +2

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
data 3223 3225 +2

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
data 817.7KB 818.3KB +555.0B
Unknown metric groups

API count

id before after diff
data 3768 3770 +2

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@spalger spalger added v7.15.0 and removed v7.14.0 labels Jun 30, 2021
@mistic mistic added v7.16.0 and removed v7.15.0 labels Aug 18, 2021
@timroes timroes requested review from a team and removed request for a team August 31, 2021 15:05
@spalger spalger added v7.17.0 and removed v7.16.0 labels Dec 7, 2021
@ppisljar
Copy link
Member

@Dosant should this be closed ?

@Dosant
Copy link
Contributor Author

Dosant commented Feb 10, 2022

Let's revisit this later

@Dosant Dosant closed this Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Search Querying infrastructure in Kibana refactoring release_note:skip Skip the PR/issue when compiling release notes technical debt Improvement of the software architecture and operational architecture v7.17.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants