# Query to get results in percentage split

**URL:** <https://discuss.elastic.co/t/query-to-get-results-in-percentage-split/106318>\
**Category:** Elasticsearch\
**Created:** [November 3, 2017, 1:38pm UTC](https://discuss.elastic.co/t/query-to-get-results-in-percentage-split/106318 "2017-11-03T13:38:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tushar\_chevulkar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tushar_chevulkar/32/46270_2.png) [@tushar\_chevulkar](https://discuss.elastic.co/u/tushar_chevulkar)\
**Post date:** [November 3, 2017, 1:38pm UTC](https://discuss.elastic.co/t/query-to-get-results-in-percentage-split/106318/1 "2017-11-03T13:38:24Z")

</div>

I have node with news articles. Now the news articles are two kinds local and international. I need to write a query where I can fetch n number of results form the node but the results should be in proportion of 60:40 (60% international and 40% local) .

Is there a way that I can do it in one query ?

Current Mapping:  
{  
"link":"link1",  
"type":"local"  
},{  
"link":"link1",  
"type":"international"  
}

---

<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:** [December 1, 2017, 1:39pm UTC](https://discuss.elastic.co/t/query-to-get-results-in-percentage-split/106318/2 "2017-12-01T13:39:46Z")

</div>

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