# .prepareSearch("index").setTypes("mytype") does not seem to set types

**URL:** <https://discuss.elastic.co/t/preparesearch-index-settypes-mytype-does-not-seem-to-set-types/1573>\
**Category:** Elasticsearch\
**Created:** [May 29, 2015, 7:29pm UTC](https://discuss.elastic.co/t/preparesearch-index-settypes-mytype-does-not-seem-to-set-types/1573 "2015-05-29T19:29:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rookie7799](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@rookie7799](https://discuss.elastic.co/u/rookie7799)\
**Post date:** [May 29, 2015, 7:29pm UTC](https://discuss.elastic.co/t/preparesearch-index-settypes-mytype-does-not-seem-to-set-types/1573/1 "2015-05-29T19:29:10Z")

</div>

Hi,  
When I print SearchRequestBuilder to see json the "types" : []  
Is this normal ?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 29, 2015, 8:33pm UTC](https://discuss.elastic.co/t/preparesearch-index-settypes-mytype-does-not-seem-to-set-types/1573/2 "2015-05-29T20:33:29Z")

</div>

Thank you for reporting that. I commented your initial issue here: [https://github.com/elastic/elasticsearch/issues/11429#issuecomment-106927850](https://github.com/elastic/elasticsearch/issues/11429#issuecomment-106927850)

Not sure if it's by design or a bug.

---

<div class="post-metadata">

**Author:** ![rookie7799](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@rookie7799](https://discuss.elastic.co/u/rookie7799)\
**Post date:** [May 29, 2015, 9:33pm UTC](https://discuss.elastic.co/t/preparesearch-index-settypes-mytype-does-not-seem-to-set-types/1573/3 "2015-05-29T21:33:46Z")

</div>

Got it. Thank you!

Apologies for the duplicate, was following instructions from the first reply 🙂

---

<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:10am UTC](https://discuss.elastic.co/t/preparesearch-index-settypes-mytype-does-not-seem-to-set-types/1573/4 "2017-07-06T00:10:42Z")

</div>


