Thanks for the reply @ptamba! I am tracking a project progress based on the start date, end date and the current date. Hence, I want the current date to change automatically to Today's/Current date in Elasticsearch.
Something like date.now is JavaScript or =Today() in Microsoft excel
Yes, you are right about this. However, this code only takes today's date.
For example, if I import my CSV file from logstash to elasticsearch today, in elasticsearch it will show today's date. But if I open up elasticsearch tomorrow, this code does not change to tomorrow's date, it will still give today's date instead.
Thus, I want the date to change to the current date as the day goes if this makes sense?
so you want to modify the value of existing document stored in elasticsearch? elasticsearch topic would be a better forum to ask about it.
you could do it in logstash with elasticsearch filter. basically you search for documents that has “Today’s date” field then update the “Today’s date” value using current date value. you can run it with a daily cron at the start of day.
doing it with ruby filter will achieve the same result.
from what you're saying, you're trying to modify existing documents that are already stored within 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.