You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by chem leakhina <ch...@gmail.com> on 2009/06/10 08:27:49 UTC

How to search date

Hi,
Could you tell me how to make query to search Date with these conditions:

Before, After, Between, All

Could you please write some example for me?

Regards,
LEE

Re: How to search date

Posted by Mat Brown <ma...@patch.com>.
Assuming the date is 2009-01-01 00:00:00 UTC...

Before: my_date:[* TO 2009-01-01T00:00:00Z]
After: my_date:[2009-01-01T00:00:00Z TO *]
Between: my_date:[2009-01-01T00:00:00Z TO 2010-01-01T00:00:00Z]
All: my_date:[* TO *] (or just don't put a date at all)

Mat

On Wed, Jun 10, 2009 at 02:27, chem leakhina <ch...@gmail.com>wrote:

> Hi,
> Could you tell me how to make query to search Date with these conditions:
>
> Before, After, Between, All
>
> Could you please write some example for me?
>
> Regards,
> LEE
>