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

Robert Muir commented on LUCENE-4370:
-------------------------------------

Specifically, on replay() CachingCollector does this:
{code}
      for (SegStart seg : cachedSegs) {
        other.setNextReader(seg.readerContext);
        other.setScorer(cachedScorer);
{code}

that looks right, but it forwards setScorer() to the delegate but not 
setNextReader().
so if its maxRAM is exceeded in collect(), it never calls setNextReader() 
before calling collect() on the delegate.

{code}
if (curDocs == null) {
  // Cache was too large
  other.collect(doc);
  return;
}
{code}
                
> Let Collector know when all docs have been collected
> ----------------------------------------------------
>
>                 Key: LUCENE-4370
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4370
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/search
>    Affects Versions: 4.0-BETA
>            Reporter: Tomás Fernández Löbbe
>            Priority: Minor
>
> Collectors are a good point for extension/customization of Lucene/Solr, 
> however sometimes it's necessary to know when the last document has been 
> collected (for example, for flushing cached data).
> It would be nice to have a method that gets called after the last doc has 
> been collected.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Reply via email to