I've two different indices on a Elasticsearch server. On index A document have the fields "date" and "fieldX" and on on index B I have the fields "date" and "fieldY".
The date element is a 1:1 relation, meaning for every date there's one document in index A and B. I want to count the documents with the value X of "fieldX" and the value Y of "fieldY" with the matching dates.
I know elasticsearch is not intended for such queries, but I can't change the data structure in this case.