lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrien Grand (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LUCENE-4874) Remove FilterTerms.intersect
Date Wed, 03 Apr 2013 23:21:20 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-4874?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Adrien Grand updated LUCENE-4874:
---------------------------------

    Attachment: LUCENE-4874.patch

Patch

 * Implements IndexReader.hasDeletions() as numDeletedDocs() > 0 by default (instead of
abstract) with no ensureOpen check (SegmentReader uses this default impl instead of liveDocs
!= null).

 * Adds warning in FilterAtomicReader about overriding

 * Methods that provide a default implementation are not implemented as in.XXX in Filter***
anymore (in particular Terms.intersect, IndexReader.hasDeletions and IndexReader.get*CacheKey).
The test in TestFilterAtomicReader has been modified to ensure this.

 * TermsEnum.termState returns a TermState that throws an UOE instead of failing silently

 * DocIdSetIterator provides a {{protected final slowAdvance(int target)}} method, which advances
linearly and can be used in implementations that don't require advance to be fast (and has
an assert to make sure that target is greater than the current position).
                
> Remove FilterTerms.intersect
> ----------------------------
>
>                 Key: LUCENE-4874
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4874
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>            Priority: Minor
>         Attachments: LUCENE-4874.patch
>
>
> Terms.intersect is an optional method. The fact that it is overridden in FilterTerms
forces any non-trivial class that extends FilterTerms to override intersect in order this
method to have a correct behavior. If FilterTerms did not override this method and used the
default impl, we would not have this problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message