I just started coding in painless and i am looking for a way to get the current date , the current date - 1 day . i see so many functions and iam a bit lost , can someone help me .
Thanks
I just started coding in painless and i am looking for a way to get the current date , the current date - 1 day . i see so many functions and iam a bit lost , can someone help me .
Thanks
can you explain a bit, what you are after and where you need this timestamp? Is there a chance you can inject it externally from your application via script parameters?
Hey , thanks for helping here's what i want to do in painless on my ELK
long datenow = new Date().getTime();
String domain ;
long previousdate = datenow - 860000 ;
for (from date now to previousdate) #thats the idea
{
domain += doc['usrName.keyword'];
}
return domain; #return all the domains
the goal its to inject it via script parameter (on a vizualise)
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.