kaivalnp commented on issue #15816:
URL: https://github.com/apache/lucene/issues/15816#issuecomment-4047278990

   This test attempts to index some vectors, [delete a 
subset](https://github.com/apache/lucene/blob/b45ea62ca00ef144c896ee99526e00b816a3dee0/lucene/core/src/test/org/apache/lucene/search/BaseVectorSimilarityQueryTestCase.java#L295-L298),
 and then perform a similarity-based vector search (i.e. find all vectors 
scoring above a threshold) with [lenient 
parameters](https://github.com/apache/lucene/blob/b45ea62ca00ef144c896ee99526e00b816a3dee0/lucene/core/src/test/org/apache/lucene/search/BaseVectorSimilarityQueryTestCase.java#L310-L316)
 that should traverse the entire graph.
   
   If its missing some results 
[here](https://github.com/apache/lucene/blob/b45ea62ca00ef144c896ee99526e00b816a3dee0/lucene/core/src/test/org/apache/lucene/search/BaseVectorSimilarityQueryTestCase.java#L325-L326),
 then the graph may not be strongly connected. We attempt to verify graph 
connected-ness 
[here](https://github.com/apache/lucene/blob/b45ea62ca00ef144c896ee99526e00b816a3dee0/lucene/core/src/test/org/apache/lucene/search/BaseVectorSimilarityQueryTestCase.java#L307),
 but that just checks if every node is reachable from the entry node, and 
[not](https://github.com/apache/lucene/blob/b45ea62ca00ef144c896ee99526e00b816a3dee0/lucene/core/src/java/org/apache/lucene/util/hnsw/HnswUtil.java#L227-L233)
 that every node is reachable from every other node in the last level.
   
   IMO this query can have an [exact search 
equivalent](https://github.com/apache/lucene/blob/b45ea62ca00ef144c896ee99526e00b816a3dee0/lucene/core/src/java/org/apache/lucene/search/AbstractKnnVectorQuery.java#L302)
 that skips graph search if "known" to be costly (in general, this is tricky to 
do for a similarity-based vector search, but having `traversalSimilarity = 
Float.NEGATIVE_INFINITY` is guaranteed to be an exact search anyways).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to