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

Hoss Man commented on LUCENE-781:
---------------------------------

let's say we do implement isCurrent for a multi directory MultiReader as a loop 
over teh sub readers that returns true if all of them return true.   If a 
client calls MultiReader.isCurrent() and gets back "false" ... what do they do 
with that information?

That information only seems usefull if they know how the MultiReader was built 
- if they know it was built from multiple readers, then can allways do that 
loop themselves.  if they don't know how the MultiReader was constructed then 
can't attempt to reopen it so what's the point of knowing wether it's up to 
date?

(argueable the app may just want to provide monitoring info about the low level 
index: but if that's the case the app should probably get that info at the 
level where it knows it's open a Reader across multiple directories)

In general: if it's never worked, then we aren't under any burden to make it 
work if there isnt' a clear meaning for the value.

> NPE in MultiReader.isCurrent() and getVersion()
> -----------------------------------------------
>
>                 Key: LUCENE-781
>                 URL: https://issues.apache.org/jira/browse/LUCENE-781
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>            Reporter: Daniel Naber
>         Attachments: multireader.diff, multireader_test.diff
>
>
> I'm attaching a fix for the NPE in MultiReader.isCurrent() plus a testcase. 
> For getVersion(), we should throw a better exception that NPE. I will commit 
> unless someone objects or has a better idea.

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