# Terms Query proportion of results?

**URL:** <https://discuss.elastic.co/t/terms-query-proportion-of-results/183372>\
**Category:** Elasticsearch\
**Created:** [May 29, 2019, 3:25pm UTC](https://discuss.elastic.co/t/terms-query-proportion-of-results/183372 "2019-05-29T15:25:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidbiller](https://avatars.discourse-cdn.com/v4/letter/d/e99b99/32.png) [@davidbiller](https://discuss.elastic.co/u/davidbiller)\
**Post date:** [May 29, 2019, 3:25pm UTC](https://discuss.elastic.co/t/terms-query-proportion-of-results/183372/1 "2019-05-29T15:25:05Z")

</div>

```
GET _search
{
  "size": 100,
  "query": {
"bool": {
  "must": [
    {
      "range": {
        "createdAt": {
          "gte": "now-30d/d"
        }
      }
    },
    {
      "terms": {
        "jobBerufId": [
          "berufsname_12",
          "berufsname_2",
          "berufsname_1"
        ]
      }
    }
  ],
  "filter": {
    "geo_distance": {
      "distance": "30km",
      "location": {
        "lat": 52.4876701,
        "lon": 13.3096058
      }
    }
  }
}
  }
}

```

Is it possible to get at least X entries of all terms here (if there are any) )  
So in the result when size: 30, i need for every term in terms, 10 items.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 26, 2019, 3:25pm UTC](https://discuss.elastic.co/t/terms-query-proportion-of-results/183372/2 "2019-06-26T15:25:10Z")

</div>

Closed on June 26, 2019, 3:25pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
