iverase opened a new pull request #1866: URL: https://github.com/apache/lucene-solr/pull/1866
see https://issues.apache.org/jira/browse/LUCENE-9523. This PR adds a check to determine if the relationship between a doc and the query shape is already known. so that it can skip an expensive relate method. In addition it adds a dense intersect visitor that it is used when the number of points > 4* number of docs so we can use the same strategy for intersects queries. Performance test shows a great increase in QPS in most cases: ``` |point|intersects|0.00|0.00|-2%|321.21|326.21|-2%|2644|2644| 0%| |box|intersects|6.45|5.74|12%|43.87|39.04|12%|33081264|33081264| 0%| |distance|intersects|6.42|5.22|23%|22.53|18.35|23%|64062400|64062400| 0%| |poly 10|intersects|5.44|4.44|23%|20.71|16.90|23%|59064569|59064569| 0%| |polyMedium|intersects|0.44|0.34|29%|27.29|21.24|29%|528812|528812| 0%| |polyRussia|intersects|1.86|1.09|70%|7.59|4.46|70%|244848|244848| 0%| |point|contains|0.00|0.00| 1%|297.94|295.05| 1%|2644|2644| 0%| |box|contains|0.00|0.00|10%|39.92|36.37|10%|484|484| 0%| |distance|contains|0.00|0.00|18%|22.93|19.51|18%|406|406| 0%| |poly 10|contains|0.00|0.00|17%|19.63|16.79|17%|402|402| 0%| |polyMedium|contains|0.00|0.00|19%|19.42|16.38|19%|147|147| 0%| |point|within|0.00|0.00| 0%|362.16|362.01| 0%|0|0| 0%| |box|within|0.58|0.54| 6%|3.94|3.72| 6%|32911251|32911251| 0%| |distance|within|1.00|1.02|-2%|3.52|3.61|-2%|63868270|63868270| 0%| |poly 10|within|0.95|0.92| 3%|3.62|3.51| 3%|58873224|58873224| 0%| |polyMedium|within|0.05|0.05| 4%|3.37|3.25| 4%|522739|522739| 0%| |polyRussia|within|0.75|0.69| 9%|3.07|2.82| 9%|244661|244661| 0%| |point|disjoint|264.37|263.24| 0%|20.08|19.99| 0%|2962178156|2962178156| 0%| |box|disjoint|185.65|181.04| 3%|14.26|13.91| 3%|2929099536|2929099536| 0%| |distance|disjoint|143.19|130.91| 9%|11.12|10.16| 9%|2898118400|2898118400| 0%| |poly 10|disjoint|138.35|123.17|12%|10.72|9.55|12%|2903116231|2903116231| 0%| |polyMedium|disjoint|159.57|141.88|12%|12.14|10.79|12%|433924372|433924372| 0%| |polyRussia|disjoint|80.56|52.82|53%|6.23|4.09|53%|12920400|12920400| 0%| ``` ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org