I have table television, it has field createdDate.
Now I want to take all televisions which are created: |NOW – createdDate| < 10 (days), for example.
How can I do this in solr?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Check out date-math-now-and-filter-queries
You can create query
fq=createdDate:[NOW-10DAY TO NOW]to filter out the documents.The debug query would be created as
createdDate:[1344059617705 TO 1344923617705]In solrconfig.xml you can use the below with the request handler :-