If no documents match the filter, such Infinity results could be generated. Please check the query with the filter and time stamp filters by itself. Is that result what you expected?
I only need the dashboard filters like dates can be applied to my vega plot, adding these two lines does not work. Also, for some plots with query block inside body it will give me
url.%context% and url.%timefield% must not be used when url.body.query is set
As I said, if this way does not work, any other way to resolve this is also acceptable.
I don't want to write deterministic query inside I want it to be interactive with the dashboard filter features outside. My original plot works fine the query return things properly.
As you said your original plot works fine, the query without filtering must be correct. And the fact that the result change (to Infinity with your example) shows the filtering works in some way. As I said, there is a possibility that no document match the filter, so I recommended to check the query with filter outside vega.
Yes, context and timefield filtering can be only used with aggregation clause and not with query clause.
I suppose the only way to use context and timefield filtering is to implement the query using only aggregation.
If you used query clause to filter documents, you can use Filter aggregation instead of query clause.
If you use "hits" of the query for formatter in vega-lite, it seems difficult but using filter aggregation with scripted metric aggregation "trick" to retrieve all documents in a bucket could be a possible choice though I have not tried.
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.