Class DateRangeQuery


  • public class DateRangeQuery
    extends SearchQuery
    A FTS query that matches documents on a range of dates. At least one bound is required, and the parser to use for the date (in String form) can be customized (see dateTimeParser(String)).
    Since:
    2.3.0
    Author:
    Simon Baslé, Michael Nitschinger
    • Constructor Detail

      • DateRangeQuery

        public DateRangeQuery()
    • Method Detail

      • start

        public DateRangeQuery start​(String start,
                                    boolean inclusive)
        Sets the lower boundary of the range, inclusive or not depending on the second parameter.
      • end

        public DateRangeQuery end​(String end,
                                  boolean inclusive)
        Sets the upper boundary of the range, inclusive or not depending on the second parameter.
      • start

        public DateRangeQuery start​(Instant start,
                                    boolean inclusive)
        Sets the lower boundary of the range, inclusive or not depending on the second parameter.
      • start

        public DateRangeQuery start​(Instant start)
        Sets the lower boundary of the range. The lower boundary is considered inclusive by default on the server side.
      • end

        public DateRangeQuery end​(Instant end,
                                  boolean inclusive)
        Sets the upper boundary of the range, inclusive or not depending on the second parameter.
      • end

        public DateRangeQuery end​(Instant end)
        Sets the upper boundary of the range. The upper boundary is considered exclusive by default on the server side.