My requirement is to fetch records whthin range of 45 days.
1) ?q=date_field:[NOW TO NOW-45DAYS] is not returning any results
2) ?q=date_field:[NOW TO NOW+45DAYS] is throwing exception
however I get correct results when i run following query :
?q=date_field:[* TO NOW]
Please suggest the correct query for range with days.
Thanks,
Prerna
Akshay-8 wrote:
>
> You can use DateMath as:
>
> date_field:[NOW TO NOW+45DAYS]
>
> On Wed, Jan 7, 2009 at 3:00 PM, prerna07 <pkhandelw...@sapient.com> wrote:
>
>>
>> Hi,
>>
>> what will be the syntax of this sql query
>> SELECT * FROM table WHERE date > SYSDATE and date <SYSDATE+45
>> in solr format ?
>>
>> I need to fetch records where date is between current date and 45 days
>> from
>> today.
>>
>> Thanks,
>> Prerna
>> --
>> View this message in context:
>> http://www.nabble.com/Solr-query-for-date-tp21327696p21327696.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>>
>
>
> --
> Regards,
> Akshay Ukey.
>
> Enjoy your job, make lots of money, work within the law. Choose any two.
> -Author Unknown.
>
>
--
View this message in context:
http://www.nabble.com/Solr-query-for-date-tp21327696p21349038.html
Sent from the Solr - User mailing list archive at Nabble.com.