# Doc\_type or Terms?

**URL:** <https://discuss.elastic.co/t/doc-type-or-terms/139167>\
**Category:** Elasticsearch\
**Created:** [July 9, 2018, 12:21pm UTC](https://discuss.elastic.co/t/doc-type-or-terms/139167 "2018-07-09T12:21:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanketshinde](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@sanketshinde](https://discuss.elastic.co/u/sanketshinde)\
**Post date:** [July 9, 2018, 12:21pm UTC](https://discuss.elastic.co/t/doc-type-or-terms/139167/1 "2018-07-09T12:21:08Z")

</div>

Hello Team,

I was wondering if there are any advantages in filtering query results based on doc\_type instead of terms. I would like to index data specific to a user. The two ways in which I thought of this could be done is to have user\_id as a term or user\_id as doc\_type.

Any ideas?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [July 9, 2018, 12:26pm UTC](https://discuss.elastic.co/t/doc-type-or-terms/139167/2 "2018-07-09T12:26:33Z")

</div>

Document types are [being removed](https://www.elastic.co/guide/en/elasticsearch/reference/master/removal-of-types.html) so I would recommend using a term in the document.

---

<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:** [August 6, 2018, 12:26pm UTC](https://discuss.elastic.co/t/doc-type-or-terms/139167/3 "2018-08-06T12:26:33Z")

</div>

Closed on August 6, 2018, 12:26pm UTC

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