I am facing some problems to create my query on a very big index of 600M documents. I'm close to resolve it however I got stuck. 

The type of documents I have is the following:

```
{
    "first_name" : "John",
    "last_name" : "Doe",
    "company_domain" : "google",
    "provider_a_id" : "1234",
    "provider_b_id" : "14"
}

```

I need to return 2 contacts per company, where the `provider_a_id` matches from a list of IDs I previously obtained.

I have come with this aggregation that it returns 2 contacts per company:

```
{
  "size": 0,
  "aggs": {
    "COMPANIES": {
      "terms": {
        "field": "company_domain.keyword",
        "order": { "_key": "asc" }, 
        "size": 2
      },
      "aggs": {
        "EMPLOYEES": {
          "top_hits": {
            "size": 2
          }
        }
      }
    }
  }
}

```

This is pretty good since I could solve one part, however the problem is that I need now to narrow the search using the `provider_a_id` as well. Would need to do something like:

```
        "EMPLOYEES": {
          "top_hits": {
            "size": 2
            // provider_a_id is in [.......] // list with 10K Ids
          }
        }

```

Do you know how I can tackle this?