[ https://issues.apache.org/jira/browse/LUCENE-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12744746#action_12744746 ]
Tim Smith commented on LUCENE-1821: ----------------------------------- Thought about it a bit more all i really need is the following method added to Searcher {code} public int getIndexReaderBase(IndexReader); {code} if this doesn't go into 2.9, i should be able to add this method to my subclass of IndexSearcher (so i wouldn't put this as blocker status for me anymore) as long as Searcher has getIndexReaderBase(), i can have my Weight hold onto the Searcher it was created with and when the scorer is created off it, i can lookup the base offset based on the IndexReader passed in i can work up a patch for this in the morning if desired also, there should be a big old warning in the change log about MultiReader based cache used in a Weight/Scorer being broken (not sure if there's a warning specifically about this in there) > Weight.scorer() not passed doc offset for "sub reader" > ------------------------------------------------------ > > Key: LUCENE-1821 > URL: https://issues.apache.org/jira/browse/LUCENE-1821 > Project: Lucene - Java > Issue Type: Bug > Components: Search > Affects Versions: 2.9 > Reporter: Tim Smith > > Now that searching is done on a per segment basis, there is no way for a > Scorer to know the "actual" doc id for the document's it matches (only the > relative doc offset into the segment) > If using caches in your scorer that are based on the "entire" index (all > segments), there is now no way to index into them properly from inside a > Scorer because the scorer is not passed the needed offset to calculate the > "real" docid > suggest having Weight.scorer() method also take a integer for the doc offset > Abstract Weight class should have a constructor that takes this offset as > well as a method to get the offset > All Weights that have "sub" weights must pass this offset down to created > "sub" weights -- 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