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

Shai Erera commented on LUCENE-2628:
------------------------------------

I agree w/ Robert. There are several drawbacks to externalizing Lucene code to 
Apache commons (or any other project):
# If we introduce a dependency on Apache commons in core, what will prevent us 
from adding more dependencies on other Apache projects in the future?
# This is sort of a tiny class, however very important. If tomorrow a change 
will be required, how will we get it into Lucene? Wait until the next commons 
release?
#* The point here is that Lucene already includes a bunch of such sophisticated 
classes because their counterpart in Java land is not optimal, and trying to 
fix it there and wait for a release is out of the question. Therefore I'm 
afraid that even if we externalize such a utility to commons, sometime in the 
future it might find its way back in Lucene (and while I don't claim to see the 
future, this has happened before already, therefore it's only logical it will 
happen again).
# Why stop w/ OpenBitSet? ArrayUtil has several useful methods as well. Perhaps 
we should externalize it too?

A different approach would be to copy-paste OBS code in Apache commons and let 
both versions live at the same time. Cassandra can depend on the one from 
commons if it wants to. If indeed nothing changes in OBS, then it's a win-win. 
If however OBS at commons will change drastically, and will e.g. perform 
faster, then we can open another issue about adopting it back into Lucene (in 
the form of copy-paste or dependency). I don't see anything that prevents you 
from starting w/ that approach, right?

Core Lucene has managed to avoid external dependencies so far, and I don't see 
a reason to introduce one for this class alone.

> Extract OpenBitSet to Apache Commons
> ------------------------------------
>
>                 Key: LUCENE-2628
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2628
>             Project: Lucene - Java
>          Issue Type: Wish
>            Reporter: Stu Hood
>
> o.a.l.util.OpenBitSet is a great alternative to java.util.BitSet, and it is 
> generally useful outside of the search field. It would be great if OpenBitSet 
> were available outside of Lucene proper, perhaps as part of Apache Commons.
> Aside from the communication required to accomplish this, there is the small 
> issue of OpenBitSet extending o.a.l.search.DocIdSet in Lucene 3.0. There is 
> very little logic contained in DocIdSet, so it could probably become an 
> interface: Lucene proper could then extend the extract version of OpenBitSet 
> to implement DocIdSet.

-- 
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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to