@InterfaceStability.Experimental @InterfaceAudience.Public public class SearchUtils extends Object
Utility class around FTS (Full Text Search), and especially handling of the default FTS date format (which corresponds to RFC 3339).
Constructor and Description |
---|
SearchUtils() |
Modifier and Type | Method and Description |
---|---|
static Date |
fromFtsString(String date)
Attempts to convert a date string, as returned by the FTS service, into a
Date . |
static String |
toFtsUtcString(Date date)
Converts a date to the default string representation in FTS (RFC 3339).
|
public static String toFtsUtcString(Date date)
Converts a date to the default string representation in FTS (RFC 3339).
date
- the Date
to convert.public static Date fromFtsString(String date)
Attempts to convert a date string, as returned by the FTS service, into a Date
.
The FTS service is expected to return date strings in RFC 3339 format, including the timezone information. For example: 2016-01-10T14:44:01-08:00
for a date in the UTC-8/PDT timezone.
date
- the date in RFC 3339 format.Date
.CouchbaseException
- when the date could not be parsed.Copyright © 2015 Couchbase, Inc.