Query To Compare Two Columns From Two Different Indexes

I have a Column in one Index with a number of Countries in it, I want to check whether these countries are similar or same as the countries in the Column in another index.

So it is like, in one index we have user data with the countries user has specified and in an other index we have the master data with the actual countries. So now I want to check whether the countries entered by user are same as the ones in master data.

If anybody knows how to write a query for this, kindly help.

Also let me know if the query should be written in scripted fields section or Dev tools or in the query dsl in filters.

The way to compare this is via scripted fields. But this is really not the use case for Elasticsearch and Kibana.

Any idea if we can do this while uploading data via Logstash? Columns are present in two separate Csv files.