title: Compare fields values of two document type values under one index
body: <p>I have two mysql tables containing thousands of rows in each table. I have index all records into elasticsearch using logstash jdbc plugin.</p>
  
  <p>The Idea is to compare difference between two tables using Elasticsearch in fast manner. Faster than SQL.</p>
  
  <p>I have index called elasticdata and two documents type table1 and table2.</p>
  
  <p>I have to compare each column1 of table1 document type with all rows of table2 document type. If difference is found print the value.</p>
  
  <p>How can it be achieved in elastic search?</p>