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

[Star Tree] [Search] Support of Boolean Queries in Aggregations supported by Star-tree #17267

Open
sandeshkr419 opened this issue Feb 5, 2025 · 0 comments
Labels
enhancement Enhancement or improvement to existing feature or request Search:Aggregations untriaged

Comments

@sandeshkr419
Copy link
Contributor

Is your feature request related to a problem? Please describe

Meta - #15257

Boolean queries can be used to filter aggregations supported via star-tree. Presently we support only term, terms & range query over supported aggregations.

Each of the supported query is converted to a DimensionFilterMapper which is then sent to StarTreeFilter to filter the relevant star-tree documents to be aggregated in Aggregation pre-computation.

We will need an implementation of DimensionFilterMapper to support Boolean queries as well.

Describe the solution you'd like

Within a boolean query, we will have to identify the query shapes which we can support via star-tree. Not all boolean queries can be supported.

1/ Identifying the supported query shapes and supported clauses (based on boolean clauses like MUST, MUST_NOT, SHOULD & FILTER) will be the first step here.

2/ Basically each boolean query can be broken down recursively to already supported atomic queries (term, terms, range) - each atomic queries will be converted to their corresponding star-tree filter provider. Now a merge utility will have to combine up these multiple filters recursively to obtain a final star-tree filter.

Now when to merge and when not to merge will be decided by 1/ by establishing a different cases for merge criteria. For example, queries like A==1 && A==2 should be blocked as they will not yield any result as currently star-tree does not supports multiple fields.

3/ Utilities to combine the following Dimension Filters: Terms+Range, Terms+Terms, Terms+Range

Related component

Search:Aggregations

Describe alternatives you've considered

No response

Additional context

Ref: https://docs.pinot.apache.org/basics/indexing/star-tree-index#supported-predicates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request Search:Aggregations untriaged
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant