Thanks Raf. On Sun, Jan 9, 2011 at 1:20 AM, Raf <r.ventag...@gmail.com> wrote:
> On Sat, Jan 8, 2011 at 7:24 PM, Raavan <valla...@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* >