Compare a field between two Index

Hi Team,
I want to compare a field between two index are have same value or not. How can we perform that? please provide the suggestions.

Example:
Let's say I have two indexes one is onlineSale and another is offlineSale. And both the index have a field called maxQuantityCanSell. And I want list of items whose maxQuantityCanSell value not same in both the index.

Please suggest are we able to achieve this or not in Elasticsearch.

That sounds a lot like a join, which Elasticsearch does not support. I therefore do not think you can do this in a single query, so you may need to write a script outside Elasticsearch.