Skip to content

[Approximation Framework] Extend approximation to top-level term queries on numeric fields #18620

@harshavamsi

Description

@harshavamsi

Is your feature request related to a problem? Please describe

Numeric fields like long, int, etc use lucene's newExactQuery which return a newRangeQuery which is internally a PointRangeQuery. With ApproximatePointRangeQuery we should be able to wrap top level term queries against these mappers. I think it is fairly common for users today to search for a single term indexed as a number and it should help speed up the results

Describe the solution you'd like

Wrap existing field mapper term queries for number fields with ApproximatePointRangeQuery. canApproximate will receive SearchContext and will kick in approximation when appropriate

Related component

Search:Performance

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

🆕 New

Status

In-Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions