public RandomAccessDocIdSet getRandomAccessDocIdSet(BoboIndexReader reader) throws IOException
{
final MultiValueFacetDataCache dataCache = (MultiValueFacetDataCache)_facetHandler.getFacetData(reader);
final int[] index = _valueConverter.convert(dataCache, _vals);
final BigNestedIntArray nestedArray = dataCache._nestedArray;
final BitVector bitset = new BitVector(dataCache.valArray.size());
for (int i : index){
bitset.set(i);
}
if (_takeCompliment)
{
// flip the bits
int size = bitset.size();
for (int i=0;i<size;++i){
if (bitset.get(i)){
bitset.clear(i);
}
else{
bitset.set(i);
}
}
}
int count = bitset.count();
if (count == 0)
{
final DocIdSet empty = EmptyDocIdSet.getInstance();
return new RandomAccessDocIdSet()