Package org.apache.lucene.search

Examples of org.apache.lucene.search.DocValuesDocIdSet


        public DocIdSet getDocIdSet(LeafReaderContext context, Bits acceptDocs) throws IOException {
            // make sure there are terms to filter on
            if (terms == null || terms.isEmpty()) return null;

            final SortedBinaryDocValues values = fieldData.load(context).getBytesValues(); // load fielddata
            return new DocValuesDocIdSet(context.reader().maxDoc(), acceptDocs) {
                @Override
                protected boolean matchDoc(int doc) {
                    values.setDocument(doc);
                    final int numVals = values.count();
                    for (int i = 0; i < numVals; i++) {
View Full Code Here


            if (terms == null || terms.isEmpty()) return null;

            IndexNumericFieldData numericFieldData = (IndexNumericFieldData) fieldData;
            if (!numericFieldData.getNumericType().isFloatingPoint()) {
                final SortedNumericDocValues values = numericFieldData.load(context).getLongValues(); // load fielddata
                return new DocValuesDocIdSet(context.reader().maxDoc(), acceptDocs) {
                    @Override
                    protected boolean matchDoc(int doc) {
                        values.setDocument(doc);
                        final int numVals = values.count();
                        for (int i = 0; i < numVals; i++) {
View Full Code Here

            // verify we have a floating point numeric fielddata
            IndexNumericFieldData indexNumericFieldData = (IndexNumericFieldData) fieldData;
            if (indexNumericFieldData.getNumericType().isFloatingPoint()) {
                final SortedNumericDoubleValues values = indexNumericFieldData.load(context).getDoubleValues(); // load fielddata
                return new DocValuesDocIdSet(context.reader().maxDoc(), acceptDocs) {
                    @Override
                    protected boolean matchDoc(int doc) {
                        values.setDocument(doc);
                        final int numVals = values.count();
View Full Code Here

                if (random().nextBoolean()) {
                    // will be considered 'fast' by AndDocIdSet
                    sets[i] = new BitDocIdSet(randomSet);
                } else {
                    // will be considered 'slow' by AndDocIdSet
                    sets[i] = new DocValuesDocIdSet(numDocs, null) {
                        @Override
                        protected boolean matchDoc(int doc) {
                            return randomSet.get(doc);
                        }
                    };
View Full Code Here

TOP

Related Classes of org.apache.lucene.search.DocValuesDocIdSet

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.