Enum FieldData

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<FieldData>

    public enum FieldData
    extends java.lang.Enum<FieldData>
    Utility methods, similar to Lucene's DocValues.
    • Method Detail

      • values

        public static FieldData[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (FieldData c : FieldData.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static FieldData valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • docsWithValue

        public static DocValueBits docsWithValue​(org.apache.lucene.index.SortedSetDocValues docValues)
        Returns a DocValueBits representing all documents from docValues that have a value.
      • docsWithValue

        public static DocValueBits docsWithValue​(org.apache.lucene.index.SortedNumericDocValues docValues)
        Returns a DocValueBits representing all documents from docValues that have a value.
      • toSortableLongBits

        public static org.apache.lucene.index.SortedNumericDocValues toSortableLongBits​(SortedNumericDoubleValues values)
        Given a SortedNumericDoubleValues, return a SortedNumericDocValues instance that will translate double values to sortable long bits using NumericUtils.doubleToSortableLong(double).
      • sortableLongBitsToDoubles

        public static SortedNumericDoubleValues sortableLongBitsToDoubles​(org.apache.lucene.index.SortedNumericDocValues values)
        Given a SortedNumericDocValues, return a SortedNumericDoubleValues instance that will translate long values to doubles using NumericUtils.sortableLongToDouble(long).
      • castToDouble

        public static SortedNumericDoubleValues castToDouble​(org.apache.lucene.index.SortedNumericDocValues values)
        Wrap the provided SortedNumericDocValues instance to cast all values to doubles.
      • singleton

        public static SortedBinaryDocValues singleton​(org.apache.lucene.index.BinaryDocValues values)
        Returns a multi-valued view over the provided BinaryDocValues.
      • isMultiValued

        public static boolean isMultiValued​(org.apache.lucene.index.SortedSetDocValues values)
        Returns whether the provided values *might* be multi-valued. There is no guarantee that this method will return false in the single-valued case.
      • toString

        public static SortedBinaryDocValues toString​(org.apache.lucene.index.SortedNumericDocValues values)
        Return a String representation of the provided values. That is typically used for scripts or for the `map` execution mode of terms aggs. NOTE: this is very slow!
      • toString

        public static SortedBinaryDocValues toString​(SortedNumericDoubleValues values)
        Return a String representation of the provided values. That is typically used for scripts or for the `map` execution mode of terms aggs. NOTE: this is very slow!
      • toString

        public static SortedBinaryDocValues toString​(org.apache.lucene.index.SortedSetDocValues values)
        Return a String representation of the provided values. That is typically used for scripts or for the `map` execution mode of terms aggs. NOTE: this is slow!
      • toString

        public static SortedBinaryDocValues toString​(MultiGeoPointValues values)
        Return a String representation of the provided values. That is typically used for scripts or for the `map` execution mode of terms aggs. NOTE: this is very slow!
      • replaceMissing

        public static org.apache.lucene.index.NumericDocValues replaceMissing​(org.apache.lucene.index.NumericDocValues values,
                                                                              long missing)
        Return a NumericDocValues instance that has a value for every document, returns the same value as values if there is a value for the current document and missing otherwise.
      • replaceMissing

        public static NumericDoubleValues replaceMissing​(NumericDoubleValues values,
                                                         double missing)
        Return a NumericDoubleValues instance that has a value for every document, returns the same value as values if there is a value for the current document and missing otherwise.