I'd like to create a TSVB Metric using the Math aggregation. I would like to create two variables using filters, so I know I need to set up those aggregations before the Math module, but I'm having trouble figuring out how.
Basically I want to create:
Variable A - Count of documents matching one query
Variable B - Count of documents matching a different query
Use Math aggregation to work on those variables and output a single number displayed as Metric
Doing math on two different sets of documents is not supported in TSVB, with one exception: if you want to divide, then there is the metric called "Filter Ratio" which accepts two filters. If you just want to display the count of two different sets of documents, you can split by the Filters aggregation.
The most flexible query-building tool we have is Vega, but it's much harder to use than TSVB. You may want to look into it.
Thanks, wylie. I've made some progress using Filter Ratio to compare the sets of documents, and then taking the output of that as a variable in Math, which has definitely gotten me closer to the measurement I had 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.