[
https://issues.apache.org/jira/browse/LUCENE-1920?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12757377#action_12757377
]
Bernd Fondermann commented on LUCENE-1920:
------------------------------------------
Thank you all for taking the time to review the patch.
I'm not that familiar with the inner workings of Lucene and the full (intented)
contract of isOptimized().
Just a few observations I made by looking at Lucene's source more closely:
+ My patch was originally crafted and tested against 2.4.0-RELEASE.
However, InstantiatedIndex in TRUNK no longer throws an exception on
non-optimized wrapped indizes, see LUCENE-1578.
So this no longer should be a problem (although I don't know if this is tested
well enough) and the patch can be looked at conservatively.
+ Nevertheless, I think it's releasonable (from a user's perspecitve) to expect
a behavior like the patch is providing.
+ This is supported by ParallelReader.isOptimized() (see LUCENE-832), which is
doing essentially the same thing like the proposed patch for MultiReader.
So this behavior is already implemented in a similar Reader.
> Make MultiReader.isOptimized() return a useful result
> -----------------------------------------------------
>
> Key: LUCENE-1920
> URL: https://issues.apache.org/jira/browse/LUCENE-1920
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Index
> Reporter: Bernd Fondermann
> Priority: Minor
> Attachments: MultiReader_isOptimized.patch
>
>
> The MultiReader statically returns FALSE on any isOptimized() call.
> This makes it unusable as the source index for an InstantiatedIndex, which
> checks initially if the source index is optimized and aborts if not.
> The attached patch iterates all sub readers and returns TRUE if all of them
> are optimized.
--
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]