Thousand of where clauses

In a project we are using elasticsearch and in some cases we have to create some queries with more than thousand of where clauses. I think we are not in the right way and there should be some solutions to avoid such huge amount of where clauses(e.g changing the design and the way we have stored the data). We don't know which record is stored on which nodes or shards, so we have to send such queries to all nodes.

Thanks

Nobody wants to to reply?!