I want to search and filter using sunspot. I want to filter using month number on a date field “date_start”. How can i filter using just the month part of my date field?
I tried something like this :
with(:date_start).greater_than(3)
Thank you for help
Add a virtual attribute to your model, for example:
Then add it to index and search it!