Hello All,
Have a simple ESQL script, to show counts in canvas.
There are scenarios where there are no documents in the index, and that is natural.
How can I check if the documents exist at all?
So instead of just running
Select count(*) from my-index
Which resolves in canvas error, I would like to perform the following:
If docunet exist --> Select count(*) from my-index.
Else return 0
Hi, I've tested locally on an old version of kibana (7.6.2) and seems to work as expected:
if I have an empty index (because I've just created the index with no documents, or I've removed the documents) the query returns correctly 0 as result.
Could you please check that the index actually exist and second check that slightly changed query:
SELECT count(*) AS count from "my-index"
It also this one doesn't work, please provide the text of the error message so I can provide a better support from this
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.