There is one LSH model (PermutationLsh) which can emit the same hash multiple times. Because of this, MatchHashesAndScoreQuery has to account for the fact that the same hash can occur multiple times. Through some trial and error, I figured out that this actually has a measurable impact on performance.
So this PR adds an optimized case to MatchHashesAndScoreQuery for hashes that occur once.
This gets the 96% recall up to 190 qps, only 10 qps away from the goal of #611.
(One of the benchmarks was as high as 195 qps, but I decided to advertise the lower value)
Related Issue
611
Changes
There is one LSH model (PermutationLsh) which can emit the same hash multiple times. Because of this, MatchHashesAndScoreQuery has to account for the fact that the same hash can occur multiple times. Through some trial and error, I figured out that this actually has a measurable impact on performance.
So this PR adds an optimized case to MatchHashesAndScoreQuery for hashes that occur once.
This gets the 96% recall up to 190 qps, only 10 qps away from the goal of #611.
(One of the benchmarks was as high as 195 qps, but I decided to advertise the lower value)
Testing and Validation
Standard CI and benchmarking