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?
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,
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.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.