benwtrent opened a new pull request, #15063: URL: https://github.com/apache/lucene/pull/15063
Optimistic knn search addresses a major issue where we return inconsistent results due to race conditions in the shared queue previously used over multi-segment search. It not only returns consistent results, but is generally better overall when it comes to recall & latency. This PR refactors the optimistic querying in AbstractKnnVectorQuery so that more sub-queries can take advantage of this logic. Additionally, this refactors PatienceKnnVectorQuery to better fit this API and utilize the underlying multi-segment search logic. Here are the results for nested vs. baseline. Note how baseline recall fluctuates, where it is consistent in candidate. closes: https://github.com/apache/lucene/issues/15059 ### BASELINE ``` recall latency(ms) netCPU avgCpuCount nDoc topK fanout maxConn beamWidth quantized visited index(s) index_docs/s num_segments index_size(MB) vec_disk(MB) vec_RAM(MB) indexType 0.628 2.650 9.980 3.766 1000000 100 250 64 250 no 0 0.00 Infinity 7 2948.33 2929.688 2929.688 HNSW 0.629 2.710 10.080 3.720 1000000 100 250 64 250 no 0 0.00 Infinity 0 0.00 0.000 0.000 HNSW 0.629 2.750 10.200 3.709 1000000 100 250 64 250 no 0 0.00 Infinity 0 0.00 0.000 0.000 HNSW 0.629 2.720 10.150 3.732 1000000 100 250 64 250 no 0 0.00 Infinity 0 0.00 0.000 0.000 HNSW 0.628 2.680 10.070 3.757 1000000 100 250 64 250 no 0 0.00 Infinity 0 0.00 0.000 0.000 HNSW 0.629 2.760 10.200 3.696 1000000 100 250 64 250 no 0 0.00 Infinity 0 0.00 0.000 0.000 HNSW ``` ### CANDIDATE ``` recall latency(ms) netCPU avgCpuCount nDoc topK fanout maxConn beamWidth quantized visited index(s) index_docs/s num_segments index_size(MB) vec_disk(MB) vec_RAM(MB) indexType 0.732 3.100 14.420 4.652 1000000 100 250 64 250 no 0 0.00 Infinity 7 2948.33 2929.688 2929.688 HNSW 0.732 3.140 14.570 4.640 1000000 100 250 64 250 no 0 0.00 Infinity 0 0.00 0.000 0.000 HNSW 0.732 3.120 14.460 4.635 1000000 100 250 64 250 no 0 0.00 Infinity 0 0.00 0.000 0.000 HNSW 0.732 3.130 14.460 4.620 1000000 100 250 64 250 no 0 0.00 Infinity 0 0.00 0.000 0.000 HNSW 0.732 3.140 14.460 4.605 1000000 100 250 64 250 no 0 0.00 Infinity 0 0.00 0.000 0.000 HNSW 0.732 3.110 14.410 4.633 1000000 100 250 64 250 no 0 0.00 Infinity 0 0.00 0.000 0.000 HNSW ``` -- 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]
