[
https://issues.apache.org/jira/browse/LUCENE-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12607609#action_12607609
]
Jason Rutherglen commented on LUCENE-1314:
------------------------------------------
A package protected field "boolean openNewFieldsReader = true;" (defaults to
true to mimic previous behavior) should be added to SegmentReader to allow
subclasses to determine if they want a new fieldsReader opened everytime a
reopen occurs. The SegmentReader.doClose would need to not close fieldsReader
if the openNewFieldsReader was set to false.
The SegmentReader.reopenSegment method directly instantiates a SegmentReader
rather than using IMPL like SegmentReader.get(Directory dir, SegmentInfo si,
SegmentInfos sis, boolean closeDir, boolean ownDir, int readBufferSize, boolean
doOpenStores) does.
In my SegmentReader subclass I am passing a lock and passing a reference to
fieldsReader for global locking and a single fieldsReader across all instances.
Otherwise there are too many instances of fieldsReader and file descriptors
will be used up.
> IndexReader.reopen(boolean force)
> ---------------------------------
>
> Key: LUCENE-1314
> URL: https://issues.apache.org/jira/browse/LUCENE-1314
> Project: Lucene - Java
> Issue Type: New Feature
> Components: Index
> Affects Versions: 2.3.1
> Reporter: Jason Rutherglen
> Assignee: Michael McCandless
> Priority: Minor
> Attachments: lucene-1314.patch
>
>
> Based on discussion
> http://www.nabble.com/IndexReader.reopen-issue-td18070256.html. The problem
> is reopen returns the same reader if there are no changes, so if docs are
> deleted from the new reader, they are also reflected in the previous reader
> which is not always desired behavior.
--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]