Class FieldStats

    • Method Detail

      • min

        public final String min()

        The minimum value found in the specified field in the result set.

        If the field is numeric (int, int-array, double, or double-array), min is the string representation of a double-precision 64-bit floating point value. If the field is date or date-array, min is the string representation of a date with the format specified in IETF RFC3339: yyyy-mm-ddTHH:mm:ss.SSSZ.

        Returns:
        The minimum value found in the specified field in the result set.

        If the field is numeric (int, int-array, double, or double-array), min is the string representation of a double-precision 64-bit floating point value. If the field is date or date-array, min is the string representation of a date with the format specified in IETF RFC3339: yyyy-mm-ddTHH:mm:ss.SSSZ.

      • max

        public final String max()

        The maximum value found in the specified field in the result set.

        If the field is numeric (int, int-array, double, or double-array), max is the string representation of a double-precision 64-bit floating point value. If the field is date or date-array, max is the string representation of a date with the format specified in IETF RFC3339: yyyy-mm-ddTHH:mm:ss.SSSZ.

        Returns:
        The maximum value found in the specified field in the result set.

        If the field is numeric (int, int-array, double, or double-array), max is the string representation of a double-precision 64-bit floating point value. If the field is date or date-array, max is the string representation of a date with the format specified in IETF RFC3339: yyyy-mm-ddTHH:mm:ss.SSSZ.

      • count

        public final Long count()

        The number of documents that contain a value in the specified field in the result set.

        Returns:
        The number of documents that contain a value in the specified field in the result set.
      • missing

        public final Long missing()

        The number of documents that do not contain a value in the specified field in the result set.

        Returns:
        The number of documents that do not contain a value in the specified field in the result set.
      • sum

        public final Double sum()

        The sum of the field values across the documents in the result set. null for date fields.

        Returns:
        The sum of the field values across the documents in the result set. null for date fields.
      • sumOfSquares

        public final Double sumOfSquares()

        The sum of all field values in the result set squared.

        Returns:
        The sum of all field values in the result set squared.
      • mean

        public final String mean()

        The average of the values found in the specified field in the result set.

        If the field is numeric (int, int-array, double, or double-array), mean is the string representation of a double-precision 64-bit floating point value. If the field is date or date-array, mean is the string representation of a date with the format specified in IETF RFC3339: yyyy-mm-ddTHH:mm:ss.SSSZ.

        Returns:
        The average of the values found in the specified field in the result set.

        If the field is numeric (int, int-array, double, or double-array), mean is the string representation of a double-precision 64-bit floating point value. If the field is date or date-array, mean is the string representation of a date with the format specified in IETF RFC3339: yyyy-mm-ddTHH:mm:ss.SSSZ.

      • stddev

        public final Double stddev()

        The standard deviation of the values in the specified field in the result set.

        Returns:
        The standard deviation of the values in the specified field in the result set.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)