I have created a forecast for a specific product.
So, I want to compare the predicted values(forecast_index) with real values(index1) and then create an alert using watcher.
How can I return the data from indices in order to compare them in the watcher?
Finally I want to compare the product with forecast_prediction and create an alert. If the forecast_prediction is higher than product send an email to me.
How can I compare these two measurements in a watcher? Or is there any other way I could do that?
this sounds so far as if you could use a chain input, that executes two queries and the have a script condition that checks if those values are different.
I think I found the problem. In my index the the product value is written like this "value-product". So in if statement the "dash" cannot be read.
Is there any way to solve this issue with the dash "-" in order to read the "ctx.payload.second.hits.hits[i]._source.value-product"?
You may want to rehink if it is feasible to compare each hit of one index with each hit of the other index. This will not work if one index has millions of items (which might not be a concern in your use-case, just something to keep in mind).
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.