List of usage examples for org.apache.lucene.util LSBRadixSorter LSBRadixSorter
LSBRadixSorter
From source file:org.apache.solr.search.DocSetBuilder.java
License:Apache License
public DocSet build(FixedBitSet filter) { if (bitSet != null) { if (filter != null) { bitSet.and(filter);/* w w w .ja v a 2s. co m*/ } return new BitDocSet(bitSet); // TODO - if this set will be cached, should we make it smaller if it's below DocSetUtil.smallSetSize? } else { LSBRadixSorter sorter = new LSBRadixSorter(); sorter.sort(PackedInts.bitsRequired(maxDoc - 1), buffer, pos); final int l = dedup(buffer, pos, filter); assert l <= pos; return new SortedIntDocSet(buffer, l); // TODO: have option to not shrink in the future if it will be a temporary set } }