Class DateField

    • Constructor Detail

      • DateField

        public DateField​(String fieldName)
    • Method Detail

      • doSetNextReader

        public void doSetNextReader​(org.apache.lucene.index.LeafReaderContext context)
                             throws IOException
        Description copied from class: AnalyticsField
        Set the segment reader context
        Specified by:
        doSetNextReader in class AnalyticsField
        Parameters:
        context - segment context
        Throws:
        IOException - if an error occurs while loading the leaf reader
      • collect

        public void collect​(int doc)
                     throws IOException
        Description copied from class: AnalyticsField
        Collect the value(s) of the wrapped field for the given document, and store the value.
        Specified by:
        collect in class AnalyticsField
        Parameters:
        doc - ID of the document to collect
        Throws:
        IOException - if an error occurs while reading the document.
      • getLong

        public long getLong()
        Description copied from interface: LongValue
        Get the long representation of the current value.

        NOTE: The value returned is not valid unless calling AnalyticsValue.exists() afterwards returns TRUE.

        Specified by:
        getLong in interface LongValue
        Returns:
        the current value
      • getDate

        public Date getDate()
        Description copied from interface: DateValue
        Get the date representation of the current value.

        NOTE: The value returned is not valid unless calling AnalyticsValue.exists() afterwards returns TRUE.

        Specified by:
        getDate in interface DateValue
        Returns:
        the current value
      • getString

        public String getString()
        Description copied from interface: StringValue
        Get the String representation of the current value.

        NOTE: The value returned is not valid unless calling AnalyticsValue.exists() afterwards returns TRUE.

        Specified by:
        getString in interface StringValue
        Returns:
        the current value
      • getObject

        public Object getObject()
        Description copied from interface: AnalyticsValue
        Get the object representation of the current value.
        Specified by:
        getObject in interface AnalyticsValue
        Returns:
        the current value
      • exists

        public boolean exists()
        Description copied from interface: AnalyticsValue
        Check whether the current value exists.
        NOTE: The result of this method is only guaranteed after any get<Type>() method is called.
        Specified by:
        exists in interface AnalyticsValue
        Returns:
        whether the current value exists
      • streamLongs

        public void streamLongs​(LongConsumer cons)
        Description copied from interface: LongValueStream
        Stream the long representations of all current values, if any exist.
        Specified by:
        streamLongs in interface LongValueStream
        Parameters:
        cons - The consumer to accept the values
      • streamDates

        public void streamDates​(Consumer<Date> cons)
        Description copied from interface: DateValueStream
        Stream the date representations of all current values, if any exist.
        Specified by:
        streamDates in interface DateValueStream
        Parameters:
        cons - The consumer to accept the values
      • streamStrings

        public void streamStrings​(Consumer<String> cons)
        Description copied from interface: StringValueStream
        Stream the String representations of all current values, if any exist.
        Specified by:
        streamStrings in interface StringValueStream
        Parameters:
        cons - The consumer to accept the values
      • getObjectComparator

        public ExpressionComparator<Date> getObjectComparator​(String expression)
        Description copied from interface: ComparableValue
        Create an entry comparator used to sort the facet-value buckets of a facet.
        Specified by:
        getObjectComparator in interface ComparableValue
        Parameters:
        expression - the name of the expression in the results array
        Returns:
        a comparator to sort the buckets with