1 Sep 2007 22:21
[jira] Commented: (LUCENE-584) Decouple Filter from BitSet
Paul Elschot (JIRA <jira <at> apache.org>
2007-09-01 20:21:19 GMT
2007-09-01 20:21:19 GMT
[
https://issues.apache.org/jira/browse/LUCENE-584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524301
]
Paul Elschot commented on LUCENE-584:
-------------------------------------
Another way to decouple from BitSet would be to keep introduce a new superclass of Filter that only has an
abstract getMatcher() method, and to add an implementation of that method in the current Filter class.
That would boil down to the current patch with two classes renamed:
Filter -> new class with abstract getMatcher() method.
BitSetFilter -> Filter.
This would avoid all backward compatibility issues, except for the unlikely case in which a getMatcher()
method is already implemented in an existing subclass of Filter.
Also, to take advantage of the independence of BitSet in other implementations, only this new class would
need to be used.
The only disadvantage I can see is that Filter is not renamed to BitSetFilter, which it actually is. But that
can be fixed by making the javadoc of Filter explicit about the use of BitSet.
For the lucene core and some of the contrib, this would mean that it would move to this new superclass of
Filter. Again, I don't expect backward compatibility issues there.
Does anyone see any problems with this approach?
When not, what name should this new superclass of Filter have? I'm thinking of MatchFilter, any other suggestions?
> Decouple Filter from BitSet
> ---------------------------
>
(Continue reading)
RSS Feed