Yes of course. The issue is for .Net only. The point is, in c# the method Bits(IndexReader reader) returns a BitArray. BitArray is quite similar to java BitSet excepts that there is no efficient way to find out how many bits in the BitArray are set to true. That is to say, there is no equivalent to Java BitSet Cardinality() method. This functionnality is quite usefull to know how many documents match a given filter. I was wondering if anyone would be interested in it. If so I could provide my own implementation of the BitArray, which mimics System.Collections.BitArray and only adds a Cardinality getter. Thus we'll have to modify the signature of the Filter abstract method Bits(IndexReader) to return it. Pros: closer to Java BitSet functionnality Cons: new class to maintain, make even more complex the conversion from Java to C# ? Regards, Nicolas
On 7/12/06, George Aroush <[EMAIL PROTECTED]> wrote:
Hi Nicolas, I am not following this issue; can you elaborate some more about it? Is this an issue for .Net of Lucene only or both? Regards, -- George -----Original Message----- From: Nicolas [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 11, 2006 5:18 PM To: [email protected] Subject: BitArray vs BitSet Hello again, There is also an other issue I would like to point out, Filter are BitArray based, unfortunately the current implementation of BitArray doesn't provide any mean to get its population (ot its 'cardinality' as defined in the Java Bitsets). Does it make sense to you to replace System.Collection.BitArrayby another implementation that could provide this functionnality ? Nicolas
