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

Steve Rowe commented on LUCENE-8060:
------------------------------------

Seed for a reproducing {{TestApproximationSearchEquivalence.testReqOpt()}} 
failure, from 
[https://builds.apache.org/job/Lucene-Solr-BadApples-NightlyTests-master/22/]; 
{{git bisect}} says the first bad commit is {{99dbe93}} on this issue:

{noformat}
Checking out Revision 6afd3d11929a75e3b3310638b32f4ed55da3ea6e 
(refs/remotes/origin/master)
[...]
   [junit4]   2> NOTE: reproduce with: ant test  
-Dtestcase=TestApproximationSearchEquivalence -Dtests.method=testReqOpt 
-Dtests.seed=195B60C59D5CF096 -Dtests.multiplier=2 -Dtests.nightly=true 
-Dtests.slow=true -Dtests.badapples=true 
-Dtests.linedocsfile=/home/jenkins/jenkins-slave/workspace/Lucene-Solr-BadApples-NightlyTests-master/test-data/enwiki.random.lines.txt
 -Dtests.locale=th-TH -Dtests.timezone=Pacific/Tahiti -Dtests.asserts=true 
-Dtests.file.encoding=UTF-8
   [junit4] FAILURE 2.01s J1 | TestApproximationSearchEquivalence.testReqOpt <<<
   [junit4]    > Throwable #1: java.lang.AssertionError: target = 4043 < docID 
= 4044
   [junit4]    >        at 
__randomizedtesting.SeedInfo.seed([195B60C59D5CF096:7DBAE508B63B8854]:0)
   [junit4]    >        at 
org.apache.lucene.search.AssertingScorer.advanceShallow(AssertingScorer.java:81)
   [junit4]    >        at 
org.apache.lucene.search.ReqOptSumScorer.advanceShallow(ReqOptSumScorer.java:215)
   [junit4]    >        at 
org.apache.lucene.search.AssertingScorer.advanceShallow(AssertingScorer.java:82)
   [junit4]    >        at 
org.apache.lucene.search.BlockMaxConjunctionScorer.advanceShallow(BlockMaxConjunctionScorer.java:228)
   [junit4]    >        at 
org.apache.lucene.search.BlockMaxConjunctionScorer$1.moveToNextBlock(BlockMaxConjunctionScorer.java:89)
   [junit4]    >        at 
org.apache.lucene.search.BlockMaxConjunctionScorer$1.advanceTarget(BlockMaxConjunctionScorer.java:110)
   [junit4]    >        at 
org.apache.lucene.search.BlockMaxConjunctionScorer$1.doNext(BlockMaxConjunctionScorer.java:181)
   [junit4]    >        at 
org.apache.lucene.search.BlockMaxConjunctionScorer$1.advance(BlockMaxConjunctionScorer.java:137)
   [junit4]    >        at 
org.apache.lucene.search.BlockMaxConjunctionScorer$1.nextDoc(BlockMaxConjunctionScorer.java:132)
   [junit4]    >        at 
org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:261)
   [junit4]    >        at 
org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:214)
   [junit4]    >        at 
org.apache.lucene.search.BulkScorer.score(BulkScorer.java:39)
   [junit4]    >        at 
org.apache.lucene.search.AssertingBulkScorer.score(AssertingBulkScorer.java:71)
   [junit4]    >        at 
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:652)
   [junit4]    >        at 
org.apache.lucene.search.AssertingIndexSearcher.search(AssertingIndexSearcher.java:72)
   [junit4]    >        at 
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:443)
   [junit4]    >        at 
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:567)
   [junit4]    >        at 
org.apache.lucene.search.IndexSearcher.searchAfter(IndexSearcher.java:419)
   [junit4]    >        at 
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:430)
   [junit4]    >        at 
org.apache.lucene.search.SearchEquivalenceTestBase.assertSameScores(SearchEquivalenceTestBase.java:251)
   [junit4]    >        at 
org.apache.lucene.search.SearchEquivalenceTestBase.assertSameScores(SearchEquivalenceTestBase.java:228)
   [junit4]    >        at 
org.apache.lucene.search.TestApproximationSearchEquivalence.testReqOpt(TestApproximationSearchEquivalence.java:296)
   [junit4]    >        at java.lang.Thread.run(Thread.java:748)
   [junit4]   2> NOTE: test params are: codec=CheapBastard, 
sim=Asserting(org.apache.lucene.search.similarities.AssertingSimilarity@150ed858),
 locale=th-TH, timezone=Pacific/Tahiti
   [junit4]   2> NOTE: Linux 4.4.0-112-generic amd64/Oracle Corporation 
1.8.0_172 (64-bit)/cpus=4,threads=1,free=389119792,total=526385152
{noformat}

> Enable top-docs collection optimizations by default
> ---------------------------------------------------
>
>                 Key: LUCENE-8060
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8060
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Priority: Minor
>             Fix For: master (8.0)
>
>         Attachments: LUCENE-8060.patch
>
>
> We are getting optimizations when hit counts are not required (sorted 
> indexes, MAXSCORE, short-circuiting of phrase queries) but our users won't 
> benefit from them unless we disable exact hit counts by default or we require 
> them to tell us whether hit counts are required.
> I think making hit counts approximate by default is going to be a bit trappy, 
> so I'm rather leaning towards requiring users to tell us explicitly whether 
> they need total hit counts. I can think of two ways to do that: either by 
> passing a boolean to the IndexSearcher constructor or by adding a boolean to 
> all methods that produce TopDocs instances. I like the latter better but I'm 
> open to discussion or other ideas?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to