Query only month and day

user1 birthday(2001-03-04)
user2 birthday(2002-03-04)
user3 birthday(2003-03-04)
user4 birthday(2008-04-04)

can i query the users which birthday is 03-04?

You need at index time to index you document as:

 "user": "user1",
 "birthday": "2001-03-04",
 "birthday_month_day": "03-04"

This is something easily solvable on the client side (on your side) but you can also think about an ingest Script processor.

en....it's a simple way,:sweat_smile:
I originally thought that es had native support

May be it is doable but it will be super slow.
I mean that you are probably looking for best practices here.

Solving the problem at index time is always better IMO.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.