Enum Class FieldData

java.lang.Object
java.lang.Enum<FieldData>
org.elasticsearch.index.fielddata.FieldData
All Implemented Interfaces:
Serializable, Comparable<FieldData>, Constable

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

    • values

      public static FieldData[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static FieldData valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • emptySortedBinary

      public static SortedBinaryDocValues emptySortedBinary()
      Return a SortedBinaryDocValues that doesn't contain any value.
    • emptyNumericDouble

      public static NumericDoubleValues emptyNumericDouble()
      Return a NumericDoubleValues that doesn't contain any value.
    • emptySortedNumericDoubles

      public static SortedNumericDoubleValues emptySortedNumericDoubles()
      Return a SortedNumericDoubleValues that doesn't contain any value.
    • emptyGeoPoint

      public static GeoPointValues emptyGeoPoint()
    • emptyMultiGeoPoints

      public static MultiGeoPointValues emptyMultiGeoPoints()
      Return a SortedNumericDoubleValues that doesn't contain any value.
    • docsWithValue

      public static DocValueBits docsWithValue(SortedBinaryDocValues values)
      Returns a DocValueBits representing all documents from values that have a value.
    • 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(MultiGeoPointValues pointValues)
      Returns a DocValueBits representing all documents from pointValues that have a value.
    • docsWithValue

      public static DocValueBits docsWithValue(SortedNumericDoubleValues doubleValues)
      Returns a DocValueBits representing all documents from doubleValues 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.
    • castToLong

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

      public static SortedNumericDoubleValues singleton(NumericDoubleValues values)
      Returns a multi-valued view over the provided NumericDoubleValues.
    • unwrapSingleton

      public static NumericDoubleValues unwrapSingleton(SortedNumericDoubleValues values)
      Returns a single-valued view of the SortedNumericDoubleValues, if it was previously wrapped with DocValues.singleton(NumericDocValues), or null.
    • singleton

      public static MultiGeoPointValues singleton(GeoPointValues values)
      Returns a multi-valued view over the provided GeoPointValues.
    • unwrapSingleton

      public static GeoPointValues unwrapSingleton(MultiGeoPointValues values)
      Returns a single-valued view of the MultiGeoPointValues, if it was previously wrapped with singleton(GeoPointValues), or null.
    • singleton

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

      public static org.apache.lucene.index.BinaryDocValues unwrapSingleton(SortedBinaryDocValues values)
      Returns a single-valued view of the SortedBinaryDocValues, if it was previously wrapped with singleton(BinaryDocValues), or null.
    • 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.