Class DoubleDocValuesField

  • All Implemented Interfaces:
    IndexableField

    public class DoubleDocValuesField
    extends NumericDocValuesField
    Syntactic sugar for encoding doubles as NumericDocValues via Double.doubleToRawLongBits(double).

    Per-document double values can be retrieved via FieldCache.getDoubles(AtomicReader, String, boolean).

    NOTE: In most all cases this will be rather inefficient, requiring eight bytes per document. Consider encoding double values yourself with only as much precision as you require.

    • Constructor Detail

      • DoubleDocValuesField

        public DoubleDocValuesField​(java.lang.String name,
                                    double value)
        Creates a new DocValues field with the specified 64-bit double value
        Parameters:
        name - field name
        value - 64-bit double value
        Throws:
        java.lang.IllegalArgumentException - if the field name is null