solr date range queries

on with Leave a reply

Apache solr date range queries may be confusing the person who handles it. I just listed few of the useful solr date range queries below. That all helps to fetch/search the published posts from certain time interval.

1) Today published post

pub_date: [NOW/DAY TO NOW]

2) Last week published post

pub_date:[NOW-7DAY/DAY TO NOW]

3) Previous week published post

 pub_date:[NOW-14DAY/DAY TO NOW/DAY-7DAY]

4) 1 Month before published post

pub_date:[NOW-1MONTH/DAY TO *]

5) One Year before published post

pub_date:[NOW-1YEAR/DAY TO NOW]

6) Six hour before published post

pub_date:[NOW-6HOUR/HOUR TO NOW]

Cheers 🙂

Posted in Cocktail and tagged , by .

About Gowri

I am professional web developer with 4+ years experience. PHP, jQuery, WordPress, Magento and Symfony2 are my key skills in web development. I am working with strong enthusiastic team with spirit. We provide all web related solution like HTML/CSS development, Web graphic design and Logo.

Leave a Reply

Your email address will not be published. Required fields are marked *