[ 
https://issues.apache.org/jira/browse/LUCENE-9620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17417412#comment-17417412
 ] 

Julie Tibshirani commented on LUCENE-9620:
------------------------------------------

Here's a randomized test failure that just popped up:
{code}
./gradlew test --tests TestBooleanQuery.testQueryMatchesCount 
-Dtests.seed=8F43C2BE8EDF853A -Dtests.slow=true -Dtests.badapples=true 
-Dtests.locale=lv-LV -Dtests.timezone=Asia/Almaty -Dtests.asserts=true 
-Dtests.file.encoding=UTF-8
{code}

{code}
org.apache.lucene.search.TestTermQuery > testQueryMatchesCount FAILED
23:10:18     java.lang.IndexOutOfBoundsException: Index 0 out of bounds for 
length 0
23:10:18         at 
__randomizedtesting.SeedInfo.seed([8F43C2BE8EDF853A:7BB4170C66E42620]:0)
23:10:18         at 
java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
23:10:18         at 
java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
23:10:18         at 
java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
23:10:18         at java.base/java.util.Objects.checkIndex(Objects.java:372)
23:10:18         at java.base/java.util.ArrayList.get(ArrayList.java:458)
23:10:18         at 
java.base/java.util.Collections$UnmodifiableList.get(Collections.java:1308)
23:10:18         at 
org.apache.lucene.search.TestTermQuery.testQueryMatchesCount(TestTermQuery.java:130)
{code}

> Add Weight#count(LeafReaderContext)
> -----------------------------------
>
>                 Key: LUCENE-9620
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9620
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Priority: Minor
>             Fix For: 8.10
>
>          Time Spent: 4h 40m
>  Remaining Estimate: 0h
>
> We have IndexSearcher#count today, which tries to optimize counting for 
> TermQuery and MatchAllDocsQuery, and falls back to BulkScorer + 
> TotalHitCountCollector otherwise.
> I'm considering moving this to Weight instead, where it'd be a better place 
> to add counting optimizations for other queries, e.g. pure disjunctions over 
> single-valued fields or range queries on points. The default implementation 
> could use a BulkScorer+TotalHitCountCollector like IndexSearcher#count does 
> today.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to