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.
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.
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.
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.
I am new to ElasticSearch and would like to apologize if you find this question trivial.