you can use the a chained input and just issue two different queries? Would that help already?
I dont understand your specific date question, can you clarify?
Also, there are no global variables, but inside of a single watch execution you can access those results, you can also store them using the index action, and use another watch to query them. Apart from that every watch gets executed by itself and does not contain any state of other watches.
About the date, I want to use something like this "return ['time': 'now-2d/d']"
But I couldn't find the right syntax to actually parse it to a date and not text.
I want to save the counts from index 1 in "chunks", for example:
Chunk1: begining to date1
Chunk2: date1 to date2
Chunk3: date2 to date3
and so on
But I want the date in index 2 to be the end date of the chunk, for example Chunk1 would be saved in index 2 with the "time" field set to date1.
The big picture: I have a lot of logs that I keep just to have a cumulative sum of all PostSurveyRequests. I want to "move" the data I need to a new index and remove the old ones (automatically). But to start with I need to set some older dates on the entries to the new index (index 2), otherwise my chart would show the data as if all happened in the last few minutes instead of the few months.
I have no issue with the queries, they work fine.
The problem is when trying to return a custom date I set: 'time' : \"5/10/2016\" - it will see this as a string and not a date value
Found this syntax for groovy: "script":"use( groovy.time.TimeCategory ) { new Date( doc[\"aDate\"].value ) }"
Is there an equivalent for painless?
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.