Date Query

34 views
Skip to first unread message

Rupesh kumar Sahu

unread,
Dec 17, 2020, 1:30:39 PM12/17/20
to bleve
How can I perform date range searches by using the >, >=, <, and <= operators ?
Can i use NewMatchQuery for search date and time ?

Marty Schoch

unread,
Dec 17, 2020, 1:35:49 PM12/17/20
to bl...@googlegroups.com
See replies inline below:

On Thu, Dec 17, 2020 at 1:30 PM Rupesh kumar Sahu <rsah...@gmail.com> wrote:

How can I perform date range searches by using the >, >=, <, and <= operators ?

I assume you mean inside of QueryStringQuery.  Yes, date range queries are supported, you can see the syntax in these test cases:

 
Can i use NewMatchQuery for search date and time ?
 
Match query performs term matching on a field, and is not appropriate for searching datetime fields.  You should use the DateRangeQuery to perform these types of searches.

marty

Reply all
Reply to author
Forward
0 new messages