Hello.
I have an index populated with people and their birth dates. I want to
create a histogram of their current ages. Is this possible?
So I have tried using a date histogram aggregation with year interval which
gives me what years the users where born. This is a good start. To get
exact ages I thought I could use the pre/post offset. Is this correct?
I use the java client and calculate the number of milliseconds that have
passes since the beginning of the year and pass that into the pre/post
offset but I always get a null response when doing this. The entire request
fails. If I remove the offsets the request passes again. Have I
misunderstood something? Is it possible to use the date histogram to
achieve what I want?
Hello.
I have an index populated with people and their birth dates. I want to
create a histogram of their current ages. Is this possible?
So I have tried using a date histogram aggregation with year interval
which gives me what years the users where born. This is a good start. To
get exact ages I thought I could use the pre/post offset. Is this correct?
I use the java client and calculate the number of milliseconds that have
passes since the beginning of the year and pass that into the pre/post
offset but I always get a null response when doing this. The entire request
fails. If I remove the offsets the request passes again. Have I
misunderstood something? Is it possible to use the date histogram to
achieve what I want?
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.