Class DateRangeQuery
- java.lang.Object
-
- com.couchbase.client.java.search.SearchQuery
-
- com.couchbase.client.java.search.queries.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 (inStringform) can be customized (seedateTimeParser(String)).- Since:
- 2.3.0
- Author:
- Simon Baslé, Michael Nitschinger
-
-
Field Summary
-
Fields inherited from class com.couchbase.client.java.search.SearchQuery
boost
-
-
Constructor Summary
Constructors Constructor Description DateRangeQuery()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DateRangeQueryboost(double boost)DateRangeQuerydateTimeParser(String dateTimeParser)The name of the date/time parser to use to interpretstart(String)andend(String).DateRangeQueryend(String end)Sets the upper boundary of the range.DateRangeQueryend(String end, boolean inclusive)Sets the upper boundary of the range, inclusive or not depending on the second parameter.DateRangeQueryend(Instant end)Sets the upper boundary of the range.DateRangeQueryend(Instant end, boolean inclusive)Sets the upper boundary of the range, inclusive or not depending on the second parameter.DateRangeQueryfield(String field)DateRangeQuerystart(String start)Sets the lower boundary of the range.DateRangeQuerystart(String start, boolean inclusive)Sets the lower boundary of the range, inclusive or not depending on the second parameter.DateRangeQuerystart(Instant start)Sets the lower boundary of the range.DateRangeQuerystart(Instant start, boolean inclusive)Sets the lower boundary of the range, inclusive or not depending on the second parameter.com.couchbase.client.core.api.search.CoreSearchQuerytoCore()-
Methods inherited from class com.couchbase.client.java.search.SearchQuery
booleanField, booleans, conjuncts, dateRange, disjuncts, docId, export, geoBoundingBox, geoBoundingBox, geoDistance, geoDistance, geoPolygon, match, matchAll, matchNone, matchPhrase, numericRange, phrase, prefix, queryString, regexp, term, termRange, toString, wildcard
-
-
-
-
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.
-
start
public DateRangeQuery start(String start)
Sets the lower boundary of the range. The lower boundary is considered inclusive by default on the server side.- See Also:
start(String, boolean)
-
end
public DateRangeQuery end(String end, boolean inclusive)
Sets the upper boundary of the range, inclusive or not depending on the second parameter.
-
end
public DateRangeQuery end(String end)
Sets the upper boundary of the range. The upper boundary is considered exclusive by default on the server side.- See Also:
end(String, boolean)
-
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.
-
dateTimeParser
public DateRangeQuery dateTimeParser(String dateTimeParser)
The name of the date/time parser to use to interpretstart(String)andend(String). Should not be modified when passing inInstant.
-
field
public DateRangeQuery field(String field)
-
boost
public DateRangeQuery boost(double boost)
- Overrides:
boostin classSearchQuery
-
toCore
public com.couchbase.client.core.api.search.CoreSearchQuery toCore()
- Specified by:
toCorein classSearchQuery
-
-