You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
The text was updated successfully, but these errors were encountered: