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

Yonik Seeley commented on LUCENE-1920:
--------------------------------------

I agree with the patch - MulitReader is not used by Lucene natively, so it's 
always instantiated by a user with multiple sub-readers, that are normally 
complete indexes on their own.  If they are all optimized, then the top-level 
should be optimized.

It's minor though, because the user could also check the optimization status of 
the sub-readers themselves.

As for instantiatedIndex, that's a different issue - I don't know why it thinks 
it needs an optimized index (no deletions? single segment? both?) but it should 
check a different way.


> 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]

Reply via email to