Package org.elasticsearch.index.fielddata

Examples of org.elasticsearch.index.fielddata.NumericDoubleValues


        // the comparator doesn't check docsWithField since we replace missing values in select()
        return new FieldComparator.FloatComparator(numHits, null, null) {
            @Override
            protected NumericDocValues getNumericDocValues(LeafReaderContext context, String field) throws IOException {
                final SortedNumericDoubleValues values = indexFieldData.load(context).getDoubleValues();
                final NumericDoubleValues selectedValues;
                if (nested == null) {
                    selectedValues = sortMode.select(values, dMissingValue);
                } else {
                    final BitSet rootDocs = nested.rootDocs(context).bits();
                    final BitSet innerDocs = nested.innerDocs(context).bits();
                    selectedValues = sortMode.select(values, dMissingValue, rootDocs, innerDocs, context.reader().maxDoc());
                }
                return selectedValues.getRawFloatValues();
            }
        };
    }
View Full Code Here


        // the comparator doesn't check docsWithField since we replace missing values in select()
        return new FieldComparator.DoubleComparator(numHits, null, null) {
            @Override
            protected NumericDocValues getNumericDocValues(LeafReaderContext context, String field) throws IOException {
                final SortedNumericDoubleValues values = getValues(context);
                final NumericDoubleValues selectedValues;
                if (nested == null) {
                    selectedValues = sortMode.select(values, dMissingValue);
                } else {
                    final BitSet rootDocs = nested.rootDocs(context).bits();
                    final BitSet innerDocs = nested.innerDocs(context).bits();
                    selectedValues = sortMode.select(values, dMissingValue, rootDocs, innerDocs, context.reader().maxDoc());
                }
                return selectedValues.getRawDoubleValues();
            }
            @Override
            public void setScorer(Scorer scorer) {
                DoubleValuesComparatorSource.this.setScorer(scorer);
            }
View Full Code Here

TOP

Related Classes of org.elasticsearch.index.fielddata.NumericDoubleValues

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.