Sync of ESQL queries in canvas, to run at the same time

Hello,
I would like to understand the execution process of ESQL queries in canvas.
The scenario is that I have 3 queries of simple counts.

ONE

SELCET COUNT(*) FROM MYINDEX
WHERE FIELD=x

TWO

SELCET COUNT(*) FROM MYINDEX
WHERE FIELD=y

THREE

SELCET COUNT(*) FROM MYINDEX
WHERE FIELD=x or FIELD=y

The expected result is 3 counters. x, y and x+y.
However, I see that the third query does not equal the 2 first queries.
i.e results of ONE + TWO <> THREE
My assumption is that the queries do not run at the same time, hence the results are different.

  1. How do the queries execute in canvas?
  2. Is it possible to sync the queries so they will be executed at the same time?

Thank you!

You could get the count where field=x and where field=y something like this;

SELECT FIELD, count(FIELD) FROM "your index*" group by FIELD

And then I'm pretty sure the expression editor could give you a total. I'll try to figure that out

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.