# How to search different type at elasticsearch

**URL:** <https://discuss.elastic.co/t/how-to-search-different-type-at-elasticsearch/90265>\
**Category:** Elasticsearch\
**Created:** [June 21, 2017, 10:25am UTC](https://discuss.elastic.co/t/how-to-search-different-type-at-elasticsearch/90265 "2017-06-21T10:25:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sharon\_wsf](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@Sharon\_wsf](https://discuss.elastic.co/u/Sharon_wsf)\
**Post date:** [June 21, 2017, 10:25am UTC](https://discuss.elastic.co/t/how-to-search-different-type-at-elasticsearch/90265/1 "2017-06-21T10:25:05Z")

</div>

Hi Team,

i have  
few type at index, like \_type: HKN, \_type:hke,\_type: uun  
"\_index": "news",  
"\_type": "hkn",

how to search the type i need.  
if only one type i know as below:  
POST /news/hkn/\_search{}

if all type will be:  
POST /news/\_search{}

how about i want selected few type like "HKN and UUN"?  
Thanks

---

<div class="post-metadata">

**Author:** ![colings86](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colings86/32/44960_2.png) [@colings86](https://discuss.elastic.co/u/colings86)\
**Post date:** [June 21, 2017, 11:05am UTC](https://discuss.elastic.co/t/how-to-search-different-type-at-elasticsearch/90265/2 "2017-06-21T11:05:53Z")

</div>

You can comma-separate the types you want to search in the url like this:

```auto
POST /news/hkn,uun/_search{}

```

Hope that helps

---

<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 19, 2017, 11:06am UTC](https://discuss.elastic.co/t/how-to-search-different-type-at-elasticsearch/90265/3 "2017-07-19T11:06:18Z")

</div>

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