# Send different queries to different types

**URL:** <https://discuss.elastic.co/t/send-different-queries-to-different-types/24910>\
**Category:** Elasticsearch\
**Created:** [July 5, 2015, 8:48am UTC](https://discuss.elastic.co/t/send-different-queries-to-different-types/24910 "2015-07-05T08:48:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![indextinker](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/indextinker/32/52744_2.png) [@indextinker](https://discuss.elastic.co/u/indextinker)\
**Post date:** [July 5, 2015, 8:48am UTC](https://discuss.elastic.co/t/send-different-queries-to-different-types/24910/1 "2015-07-05T08:48:00Z")

</div>

Hi,

I would like to issue different queries to different types under the same index, while leave the ranking and paging of all the results to elasticsearch. I know that if you want to issue the same request to different types you can use something like:  
$ curl -XGET '[http://localhost:9200/twitter/tweet,user/\_search?q=user:kimchy](http://localhost:9200/twitter/tweet,user/_search?q=user:kimchy)'  
but how can I specify different queries to tweet and user types here?

Any insights or ideas will be much appreciated!

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [July 5, 2015, 12:19pm UTC](https://discuss.elastic.co/t/send-different-queries-to-different-types/24910/2 "2015-07-05T12:19:36Z")

</div>

Look at the type filter.

---

<div class="post-metadata">

**Author:** ![indextinker](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/indextinker/32/52744_2.png) [@indextinker](https://discuss.elastic.co/u/indextinker)\
**Post date:** [July 5, 2015, 5:09pm UTC](https://discuss.elastic.co/t/send-different-queries-to-different-types/24910/3 "2015-07-05T17:09:07Z")

</div>

you meant to issue a single query request to an index consists of two separate queries each with a type filter combined by a boolean query?

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [July 5, 2015, 5:48pm UTC](https://discuss.elastic.co/t/send-different-queries-to-different-types/24910/4 "2015-07-05T17:48:13Z")

</div>

Pretty much.

---

<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:** [July 6, 2017, 12:03am UTC](https://discuss.elastic.co/t/send-different-queries-to-different-types/24910/5 "2017-07-06T00:03:33Z")

</div>


