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

[BUG] Optimisation is not done when profile option is enabled #17677

Open
expani opened this issue Mar 25, 2025 · 1 comment
Open

[BUG] Optimisation is not done when profile option is enabled #17677

expani opened this issue Mar 25, 2025 · 1 comment
Labels
bug Something isn't working Search Search query, autocomplete ...etc

Comments

@expani
Copy link
Contributor

expani commented Mar 25, 2025

Describe the bug

While analyzing the performance differences in keyword-terms operation in Big5 workload i noticed that the optimization of intersecting between the .tim Term Index unique terms and the Global ordinals doesn't kick in when profile: true is set on a search request.

The optimization returns because the weight is null here

Related component

Search

To Reproduce

Run Big5 benchmark on a local setup ( single node....doesn't matter )

Run the keyword-terms query with and without profile and debug to check if the optimization of GlobalOrdinalsStringTermsAggregator#tryCollectFromTermFrequencies gets skipped when profile is enabled.

Expected behavior

We should be using the optimization even when the query is being profiled.

Additional Details

No response

@expani expani added bug Something isn't working untriaged labels Mar 25, 2025
@github-actions github-actions bot added the Search Search query, autocomplete ...etc label Mar 25, 2025
@kkewwei
Copy link
Contributor

kkewwei commented Mar 25, 2025

I think it reasonable. As long as it does not involve cache-related pruning, we can execute the profile as usual.

It appears that by overriding the setWeight in both InternalProfileCollector and ProfilingAggregator, we can effectively achieve the desired outcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Search Search query, autocomplete ...etc
Projects
Status: 🆕 New
Development

No branches or pull requests

3 participants