1

I have a drupal site which have some events.

I am using apachesolr module for searching the site. Currently two fields are used for searching "keywords" and "location". Now I want to add the date field and when I click the search button it also query the search based on the date selected in the date field.

Suppose If I selected a 10/01/2011(m/d/Y) in the date field It should display the events with date 10/01/2011 or greater.

Any Idea?

1

Take a look at the Lucene search syntax, for dates use a filter query like created:[2011-10-01T23:59:59Z TO 2011-10-31T14:11:00Z]

1

Just came across this thread while searching for this as well and can offer an updated response for anyone using Drupal 7. If you're using Search API to search your Solr Index, Search API Date facets probably has the functionality you are looking for:

enter image description here

Or you can set this up as a range (possibly assuming years?) using the the Search API Search Ranges module:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.