[ https://issues.apache.org/jira/browse/LUCENE-10367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17475379#comment-17475379 ]
LuYunCheng commented on LUCENE-10367: ------------------------------------- i think when the minimumNumberMatch is ConstantLongValuesSource , it is correctly to rewrite to a BooleanQuery which value is less than the queries.size(). i do the Unit Test in TestCoveringQuery.java testRandomWand And i do some mini benchmark using TestCoveringQueryBench.java with different constant value, it shows: Constant Value 1: TEST: WAND with BooleanQuery elapsed 68ms TEST: NOWAND elapsed 159ms Constant Value 2: TEST: WAND elapsed 86ms TEST: NOWAND elapsed 225ms Constant Value 3: TEST: WAND elapsed 80ms TEST: NOWAND elapsed 169ms Constant Value 4: TEST: WAND elapsed 21ms TEST: NOWAND elapsed 117ms > Use WANDScorer in CoveringQuery Can accelerate scorer time > ---------------------------------------------------------- > > Key: LUCENE-10367 > URL: https://issues.apache.org/jira/browse/LUCENE-10367 > Project: Lucene - Core > Issue Type: Improvement > Components: core/query/scoring, core/search, modules/sandbox > Reporter: LuYunCheng > Priority: Major > Attachments: LUCENE-10367-1.patch, LUCENE-10367.patch, > TestCoveringQueryBench.java > > > When using CoveringQuery In Elasticsearch with terms_set query, it takes too > much time in CoveringScore and major cost in matain the DisiPriorityQueue: > subScorers. > But when minimumNumberMatch is ConstantLongValuesSource, we can use > WANDScorer to optimize it. > > i do a mini benchmark with 1m docs, which code in LUCENE-10367.patch > TestCoveringQuery.java testRandomBench() > it shows: > TEST: WAND elapsed 67ms > TEST: NOWAND elapsed 163ms > My testing environment is macBook with Intel Core i7 16GMem. -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org