/** * Wrap the provided {@link SortedNumericDocValues} instance to cast all values to doubles. */ public static SortedNumericDoubleValues castToDouble(final SortedNumericDocValues values) { final NumericDocValues singleton = DocValues.unwrapSingleton(values); if (singleton != null) { return singleton(new DoubleCastedValues(singleton)); } else { return new SortedDoubleCastedValues(values); } }
/** * Wrap the provided {@link SortedNumericDocValues} instance to cast all values to doubles. */ public static SortedNumericDoubleValues castToDouble(final SortedNumericDocValues values) { final NumericDocValues singleton = DocValues.unwrapSingleton(values); if (singleton != null) { final Bits docsWithField = DocValues.unwrapSingletonBits(values); return singleton(new DoubleCastedValues(singleton), docsWithField); } else { return new SortedDoubleCastedValues(values); } }
/** * Wrap the provided {@link SortedNumericDocValues} instance to cast all values to doubles. */ public static SortedNumericDoubleValues castToDouble(final SortedNumericDocValues values) { final NumericDocValues singleton = DocValues.unwrapSingleton(values); if (singleton != null) { final Bits docsWithField = DocValues.unwrapSingletonBits(values); return singleton(new DoubleCastedValues(singleton), docsWithField); } else { return new SortedDoubleCastedValues(values); } }
/** * Wrap the provided {@link SortedNumericDocValues} instance to cast all values to doubles. */ public static SortedNumericDoubleValues castToDouble(final SortedNumericDocValues values) { final NumericDocValues singleton = DocValues.unwrapSingleton(values); if (singleton != null) { return singleton(new DoubleCastedValues(singleton)); } else { return new SortedDoubleCastedValues(values); } }
/** * Wrap the provided {@link SortedNumericDocValues} instance to cast all values to doubles. */ public static SortedNumericDoubleValues castToDouble(final SortedNumericDocValues values) { final NumericDocValues singleton = DocValues.unwrapSingleton(values); if (singleton != null) { return singleton(new DoubleCastedValues(singleton)); } else { return new SortedDoubleCastedValues(values); } }