Hi All,

I am using Solr facets logic to implement faceted searching in my web site.

One problem I am facing here is that I am using BitArray class of .NET
instead of BitSet class of java. The BitSet class has one method
"Cardinality" which is not available in BitArray. This method returns number
of True bits in BitSet. To achieve this goal I have used following logic...

      Dim c As Integer = 0
       For Each bit As Boolean In BitArray
           If bit Then
               c += 1
           End If
       Next
       Return c

Here I have used Loop and it consume little bit more time while preparing
facets.

I would be interested in hearing what others think about this problem and
how to best implement this functionality.

Thanks in advance

Sawan

Reply via email to