Package org.elasticsearch.common.lucene.docset

Examples of org.elasticsearch.common.lucene.docset.SlicedOpenBitSet


        if (allocation == null) {
            return DocSets.cacheable(reader, set);
        }
        // we have an allocation, use it to create SlicedOpenBitSet
        if (set instanceof OpenBitSet) {
            return new SlicedOpenBitSet(allocation.getData(), allocation.getOffset(), (OpenBitSet) set);
        } else if (set instanceof OpenBitDocSet) {
            return new SlicedOpenBitSet(allocation.getData(), allocation.getOffset(), ((OpenBitDocSet) set).set());
        } else {
            SlicedOpenBitSet slicedSet = new SlicedOpenBitSet(allocation.getData(), numOfWords, allocation.getOffset());
            slicedSet.fastSet(doc); // we already have an open iterator, so use it, and don't forget to set the initial one
            while ((doc = it.nextDoc()) != DocIdSetIterator.NO_MORE_DOCS) {
                slicedSet.fastSet(doc);
            }
            return slicedSet;
        }
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.common.lucene.docset.SlicedOpenBitSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.