lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shai Erera (Commented) (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3620) FilterIndexReader does not override all of IndexReader methods
Date Tue, 06 Dec 2011 18:41:39 GMT


Shai Erera commented on LUCENE-3620:

Then why don't we make FilterIndexReader abstract class, and declare reopen/doOpenIfChanged/clone
abstract? I don't think it's useful to just init FilterIndexReader right? And clearly those
methods need to be overridden by sub-classes, or they would already receive UnsupportedOperationException

bq. numDeletedDocs should be final in IndexReader

Ok. Is it an acceptable backwards-break?

I will post a patch which updates FIR and the test.
> FilterIndexReader does not override all of IndexReader methods
> --------------------------------------------------------------
>                 Key: LUCENE-3620
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: core/search
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>            Priority: Minor
>             Fix For: 3.6, 4.0
>         Attachments: LUCENE-3620.patch
> FilterIndexReader does not override all of IndexReader methods. We've hit an error in
LUCENE-3573 (and fixed it). So I thought to write a simple test which asserts that FIR overrides
all methods of IR (and we can filter our methods that we don't think that it should override).
The test is very simple (attached), and it currently fails over these methods:
> {code}
> getRefCount
> incRef
> tryIncRef
> decRef
> reopen
> reopen
> reopen
> reopen
> clone
> numDeletedDocs
> document
> setNorm
> setNorm
> termPositions
> deleteDocument
> deleteDocuments
> undeleteAll
> getIndexCommit
> getUniqueTermCount
> getTermInfosIndexDivisor
> {code}
> I didn't yet fix anything in FIR -- if you spot a method that you think we should not
override and delegate, please comment.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message