[
http://issues.apache.org/jira/browse/LUCENE-686?page=comments#action_12444742 ]
Doron Cohen commented on LUCENE-686:
------------------------------------
An example of how current Lucene code relies on not having to close resoures,
in PhraseQuery:
...
scorer(IndexReader reader) {
...
for (int i = 0; i < terms.size(); i++) {
TermPositions p = reader.termPositions((Term)terms.elementAt(i));
if (p == null)
return null; < - - - - change would be required here
tps[i] = p;
}
If close() has to be respected this code would need to change to close all
TermPositions that were obtained just before the one that was not found.
> Resources not always reclaimed in scorers after each search
> -----------------------------------------------------------
>
> Key: LUCENE-686
> URL: http://issues.apache.org/jira/browse/LUCENE-686
> Project: Lucene - Java
> Issue Type: Bug
> Components: Search
> Environment: All
> Reporter: Ning Li
> Attachments: ScorerResourceGC.patch
>
>
> Resources are not always reclaimed in scorers after each search.
> For example, close() is not always called for term docs in TermScorer.
> A test will be attached to show when resources are not reclaimed.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
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]