Example usage for org.apache.lucene.util LSBRadixSorter LSBRadixSorter

List of usage examples for org.apache.lucene.util LSBRadixSorter LSBRadixSorter

Introduction

In this page you can find the example usage for org.apache.lucene.util LSBRadixSorter LSBRadixSorter.

Prototype

LSBRadixSorter

Source Link

Usage

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
    }
}