lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raf <r.ventag...@gmail.com>
Subject Re: is OpenBitSet / SortedVIntList compressed bit map index?
Date Sun, 09 Jan 2011 09:20:51 GMT
On Sat, Jan 8, 2011 at 7:24 PM, Raavan <vallalku@gmail.com> wrote:

> Also, just for my understanding, is SortedVIntList able to perform some
> operations such as AND/OR without decompression ?
>

No, not natively:
http://lucene.apache.org/java/3_0_2/api/core/org/apache/lucene/util/SortedVIntList.html

But the *iterator* returns the *docIds* by order and there is a *constructor
*that accepts a *DocIdSetIterator*.

So it's quite easy to implement the AND/OR operations by creating a *
DocIdSetIterator *that receives the two iterators from the original *
SortedVIntLists* and scans them in parallel, implementing *nextDoc* and *
advance* methods accordingly to AND/OR semantic.

We use something like that and, for very sparse bitsets, it is more
efficient than to convert them in *OpenBitSets* in order to perform AND/OR
operations.

Bye
*Raf*

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