[ https://issues.apache.org/jira/browse/LUCENE-1593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12698798#action_12698798 ]
Michael McCandless commented on LUCENE-1593: -------------------------------------------- bq. So I "ant clean" and then "ant test-core" - all tests passed Hmmm something weird is going on. I ran this test: * start "ant clean test" * STOP that job after it's done compiling everything * go change PriorityQueue.put to return int instead of void * ant jar-core * restart the "ant test" job and I hit errors like this: {code} [junit] java.lang.NoSuchMethodError: org.apache.lucene.search.PhraseQueue.put(Ljava/lang/Object;)V [junit] at org.apache.lucene.search.PhraseScorer.sort(PhraseScorer.java:139) [junit] at org.apache.lucene.search.PhraseScorer.init(PhraseScorer.java:133) [junit] at org.apache.lucene.search.PhraseScorer.next(PhraseScorer.java:76) [junit] at org.apache.lucene.search.Scorer.score(Scorer.java:67) [junit] at org.apache.lucene.search.IndexSearcher.doSearch(IndexSearcher.java:269) [junit] at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:257) [junit] at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:181) [junit] at org.apache.lucene.search.Searcher.search(Searcher.java:181) [junit] at org.apache.lucene.TestSearch.doTestSearch(TestSearch.java:124) [junit] at org.apache.lucene.TestSearch.testSearch(TestSearch.java:58) [junit] at org.apache.lucene.util.LuceneTestCase.runTest(LuceneTestCase.java:88) {code} (which is what I expected). Yet, when I run "ant clean test-tag" with that same change, I don't see a failure... I fear "ant test-tag" is somehow not doing the right thing. I'll go reopen that issue... > Optimizations to TopScoreDocCollector and TopFieldCollector > ----------------------------------------------------------- > > Key: LUCENE-1593 > URL: https://issues.apache.org/jira/browse/LUCENE-1593 > Project: Lucene - Java > Issue Type: Improvement > Components: Search > Reporter: Shai Erera > Fix For: 2.9 > > > This is a spin-off of LUCENE-1575 and proposes to optimize TSDC and TFC code > to remove unnecessary checks. The plan is: > # Ensure that IndexSearcher returns segements in increasing doc Id order, > instead of numDocs(). > # Change TSDC and TFC's code to not use the doc id as a tie breaker. New docs > will always have larger ids and therefore cannot compete. > # Pre-populate HitQueue with sentinel values in TSDC (score = Float.NEG_INF) > and remove the check if reusableSD == null. > # Also move to use "changing top" and then call adjustTop(), in case we > update the queue. > # some methods in Sort explicitly add SortField.FIELD_DOC as a "tie breaker" > for the last SortField. But, doing so should not be necessary (since we > already break ties by docID), and is in fact less efficient (once the above > optimization is in). > # Investigate PQ - can we deprecate insert() and have only > insertWithOverflow()? Add a addDummyObjects method which will populate the > queue without "arranging" it, just store the objects in the array (this can > be used to pre-populate sentinel values)? > I will post a patch as well as some perf measurements as soon as I have them. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org