# Search over multiple heterogenous types

**URL:** <https://discuss.elastic.co/t/search-over-multiple-heterogenous-types/9672>\
**Category:** Elasticsearch\
**Created:** [November 12, 2012, 11:47am UTC](https://discuss.elastic.co/t/search-over-multiple-heterogenous-types/9672 "2012-11-12T11:47:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prakhar\_Goel](https://avatars.discourse-cdn.com/v4/letter/p/ecccb3/32.png) [@Prakhar\_Goel](https://discuss.elastic.co/u/Prakhar_Goel)\
**Post date:** [November 12, 2012, 11:47am UTC](https://discuss.elastic.co/t/search-over-multiple-heterogenous-types/9672/1 "2012-11-12T11:47:03Z")

</div>

I have several types defined in my elasticsearch index like "product",  
"manufacturer", "locales" etc. I want to search across all these types  
in a single query. Each type has different number of fields. But all  
types have a field called "NAME" which is searchable and a field  
called "TYPE" which holds its type. How do I create a search query to  
retrive a list of heterogenous results?

--

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [November 12, 2012, 12:32pm UTC](https://discuss.elastic.co/t/search-over-multiple-heterogenous-types/9672/2 "2012-11-12T12:32:36Z")

</div>

You can specify a list of types that you want to search on URL or not  
specify type at all if you want to search all types at the same  
time: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/search/indices-types.html)

On Monday, November 12, 2012 6:47:09 AM UTC-5, Prakhar Goel wrote:

> I have several types defined in my elasticsearch index like "product",  
> "manufacturer", "locales" etc. I want to search across all these types  
> in a single query. Each type has different number of fields. But all  
> types have a field called "NAME" which is searchable and a field  
> called "TYPE" which holds its type. How do I create a search query to  
> retrive a list of heterogenous results?

--

---

<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, 3:04am UTC](https://discuss.elastic.co/t/search-over-multiple-heterogenous-types/9672/3 "2017-07-06T03:04:44Z")

</div>


