I want to add a field called "time_frame" which is the date range between "on_time" and "off_time" to all documents in a index, what is the Elasticsearch command to perform this?
so if the documents have already been indexed, you could use the update by query API and execute a script that calculates the duration between the two timestamps.
hello Alex,
I hope there will be a good code example like my case,
I have read your link but I really not understanding well from the examples
and nonetheless the examples are too simple and I cannot really take them as reference
also painless script example are also too little
if possible, I hope you could show some coding for my case
Thanks
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.