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

[PROPOSAL] Advanced Optimization Techniques for Hybrid query #783

Open
martin-gaievski opened this issue Jun 10, 2024 · 2 comments
Open
Labels
Enhancements Increases software capabilities beyond original client specifications

Comments

@martin-gaievski
Copy link
Member

martin-gaievski commented Jun 10, 2024

What/Why

What are you proposing?

With 2.15 version there has been lot of progress in area of improving search latency for Hybrid query (changes that are done under umbrella of #704). Team needs to continue looking for ways of optimizing latency.

Following is a flame graph taken from system after 2.15 version release.

At the high level here are some areas where team can apply efforts:

  • document iterator
    in today's implementation we use DisiWrapper for iterating over one sub-query results and DisiPriorityQueue to collect scores for one doc id. Few foundational ideas are in this approach: iterate by one doc id, process iterators of every sub-query so they all point to the same doc id we we do a Scorer.score(). This brings some limitations, e.g. we cannot do bulk/block iteration on a set of documents.

  • optimizations in special cases
    we can optimize for some special cases, like for example if 2+ sub-queries can be re-written to the same lucene level query we can execute only one and re-use scores for others

  • caching strategies: Implementing smarter caching mechanisms to reduce redundant computations.

  • algorithmic Improvements: optimizing existing algorithms or introducing new ones that can handle hybrid queries more efficiently.

@dblock
Copy link
Member

dblock commented Jul 1, 2024

[Catch All Triage - Attendees 1, 2, 3, 4, 5]

@dblock dblock added enhancement Enhancements Increases software capabilities beyond original client specifications and removed untriaged enhancement labels Jul 1, 2024
@martin-gaievski
Copy link
Member Author

One more idea: we can have dedicated coordinator node and profile it in isolation to catch hot spots specific to processor code. Previously we have done one-man-orchestra approach with cluster configuration, meaning hot spots of processor may be overshadowed or distorted by searchers at the data node level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancements Increases software capabilities beyond original client specifications
Projects
Status: Backlog
Development

No branches or pull requests

2 participants