Skip to content

Feature/allow numeric field exact searches to use docvalues #99801

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

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

piergm
Copy link
Member

@piergm piergm commented Sep 22, 2023

BKD-tree-backed field types (NumberFieldMapper and UnsignedLongFieldMapper) use index structures optimised for range querying therefore don't execute exact match queries very efficiently.
This can lead to slow queries on the id field since using a numeric field for IDs is a common anti-pattern in elasticsearch, as ids created by other databases are often numeric in form.
We want to allow numeric fields to use IndexOrDocValuesQuery in order to improve performance in the case where a numeric id field is combined with more restrictive filters.

@piergm piergm added >enhancement :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team v8.11.0 labels Sep 22, 2023
@piergm piergm self-assigned this Sep 22, 2023
@elasticsearchmachine
Copy link
Collaborator

Hi @piergm, I've created a changelog YAML for you.

@javanna javanna added :Search Foundations/Mapping Index mappings, including merging and defining field types and removed :Search/Search Search-related issues that do not fall into other categories labels Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Meta label for search team v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants