- 
                Notifications
    
You must be signed in to change notification settings  - Fork 25.6k
 
Add 'profile' support for knn query on HNSW with early termination #135342
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
Conversation
| 
           Hi @tteofili, I've created a changelog YAML for you.  | 
    
…nto hnsw_et_profile
| 
           Pinging @elastic/es-search-relevance (Team:Search Relevance)  | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think this can work with ESDiversifyingChildren*KnnVectorQuery objects as well? I would expect it to work OK as we still delegate to the underlying collector.
Or did you test it and it not provide good results?
        
          
                server/src/main/java/org/elasticsearch/search/vectors/PatienceCollectorManager.java
              
                Outdated
          
            Show resolved
            Hide resolved
        
      
          
 yes, it works also with diversifying knn query (had run benchmarks in the original PR too), I've fixed this in 53cfeb5.  | 
    
This is a followup to #127223 that leverages some changes in Lucene 10.3 to extend and reuse
HnswQueueSaturationCollectorto simplify code in ES for early termination on HNSW.Very importantly, it also adds 'profile' support so that
vector_opsare now correctly recorded also when early termination is enabled.