title: How to use only the search set generated by the previous query for searching the current query in ElasticSearch
body: <p>I am working on a Search Engine for searching strings. There is around 600 GB of data stored at ElasticSearch index with 4 nodes, having 5 primary shards and 1 replica set.</p>
  
  <p>Assume there is a complete data set A(600GB) on which first time search, results in a new data set B(30GB) and then filters are applied on the data set B.</p>
  
  <p>As of now I am creating a new query every-time a filter is applied and whole data i.e. set A(600GB) is used for searching, I want to know if there is a way to use only the data set B(30GB) for the subsequent filtering. If yes then how can I achieve this.</p>
  
  <p>I am asking this because I think there should some way to achieve this. Since, when I do the search it shows the number of hits, which I think means ElasticSearch knows exactly which documents I want to use for subsequent filtering. </p>
  
  <p>I am new to ElasticSearch so please pardon me if you find this question trivial.</p>