I have a field with the following mapping:
birthdate: { type: :date, format: :dateOptionalTime }
- I need to find everyone who were born in month of May (including all years)
- Another query is to find all people who were born on 'August 25' (including all years)
What would be the query for that?
You can achieve this with a
script
filterAll people born in May of any year:
All people born on August 25th (any year)
First question:
Second question:
Here's the code I used to test it:
http://sense.qbox.io/gist/36c800cabbe4143ecf72144d02e58e267c1e761a