All this script does is create a new index, then insert one record, then do a search with run time field. Once you do the search, you will see the error I mentioned.
Nested Field and runtime are much harder not directly supported by painless you have to loop through them etc with a much more complex script... is that what you really want?
Are you going to have an array of achievements?
If so which one do you want to access in the runtime field? All of them? The First One? The Last One?
I know this is an example but what are you really trying to accomplish?
One of the queries I wanted to run and visualize in Kibana is something like:
Graph Type: Horizontal Bar
Y Axis : Number of Days since Achievement.completion_date
X Axis: Concat(player.name, achievement[N].quest)
Filter: WHERE player.create_date >= 2023-01 && player.create_date < 2023-02-01
So the part I'm trying to figure out is how to loop through every achievement and subtract its completion_date from (new Date()).getTime().
Also, a bit later, I might want to apply a "compound interest" formula to the achievement.points , then plot y-axis as "compound interest points" and x axis is concat(player.name, achievement[x].quest)
Do you have suggestion on what I need to study? or any code examples that I can learn from?
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.