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

Quick: Remove expensive prefix filter from Elasticsearch file queries #1503

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

jarosenb
Copy link
Member

Overview:

This might be related to recent cluster upgrades, but search in the Data Depot has gotten really slow due to the Elasticsearch query planner evaluating filters in the wrong order. The prefix query is being evaluated first, which causes Elasticsearch to iterate over the entire index instead of just the small subset of results from the query_string query.

This diff replaces the prefix filter with an equivalent term filter using our existing path_hierarchy tokens.

@jarosenb jarosenb merged commit 8aa9fb4 into main Dec 16, 2024
5 checks passed
@jarosenb jarosenb deleted the quick/20241216-file-search-perf branch December 16, 2024 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants