lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas <>
Subject Re: BitArray vs BitSet
Date Wed, 12 Jul 2006 11:44:12 GMT
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# ?

On 7/12/06, George Aroush <> 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 []
> Sent: Tuesday, July 11, 2006 5:18 PM
> To:
> 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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message