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

Initial filter query inefficiency with `_msearch` #1502

Open
mitchgillin opened this issue Jun 26, 2020 · 3 comments
Open

Initial filter query inefficiency with `_msearch` #1502

mitchgillin opened this issue Jun 26, 2020 · 3 comments
Assignees
Labels
bug

Comments

@mitchgillin
Copy link

@mitchgillin mitchgillin commented Jun 26, 2020

Affected Projects
React

Library Version: x.y.z
3.11.4

Describe the bug
Initial load of app is causing a _msearch to fire for each filter. Having large doc sizes in ES and having multiple filters in place is causing crashes to my infra.

To Reproduce
Have ~15 filters in place and hit an ES node with large files.

Expected behavior
ReactiveSearch should batch all queries on first render to perform an efficient _msearch

Desktop (please complete the following information):

  • OS: MacOS Catalana 10.15.5
  • Browser: Brave/Chrome
  • Version: 1.11.69 Chromium: 83.0.4103.106 (Official Build) beta (64-bit)
@mitchgillin mitchgillin added the bug label Jun 26, 2020
@bietkul
Copy link
Collaborator

@bietkul bietkul commented Jul 23, 2020

@mitchgillin We already have that issue in our top priority. For now you can try the following things:

  • Use collapsible UI for filters, only render when required or interacted by user.
  • Use small sizes for filter queries
@bietkul bietkul self-assigned this Jul 23, 2020
@janhoy
Copy link

@janhoy janhoy commented Aug 19, 2020

Would it not be more efficient if ReactiveSearch sent one search request to ES, compiled from the needs of all components, and then each component subscribes to the result and pulls out "their" data? Or do you have a use case where you'll update a filter widget without updating the main search result or the opposite?

@siddharthlatest
Copy link
Member

@siddharthlatest siddharthlatest commented Aug 19, 2020

@janhoy This is how ReactiveSearch works, it generates a combined query (via msearch, multi search) for all the components that would be affected by a given interaction. Except during the initialization phase, where ReactiveSearch fires independent queries for each component instead of combining them together. The above issue is specific to this scenario - there is room for improvement here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.