# Type query versus \_search within a specified type

**URL:** <https://discuss.elastic.co/t/type-query-versus--search-within-a-specified-type/72802>\
**Category:** Elasticsearch\
**Created:** [January 25, 2017, 6:46pm UTC](https://discuss.elastic.co/t/type-query-versus--search-within-a-specified-type/72802 "2017-01-25T18:46:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kasia](https://avatars.discourse-cdn.com/v4/letter/k/f07891/32.png) [@kasia](https://discuss.elastic.co/u/kasia)\
**Post date:** [January 25, 2017, 6:46pm UTC](https://discuss.elastic.co/t/type-query-versus--search-within-a-specified-type/72802/1 "2017-01-25T18:46:22Z")

</div>

Hi,  
Is there any difference between a type query and a \_search performed within a specified index/type context?

```
GET /_search
{
    "query": {
        "type" : {
            "value" : "my_type"
        }
    }
}

GET _all/my_type/_search
{}

```

Should they differ in some way, could you provide a use case showing the difference?

Thank you,  
Kasia

---

<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:** [February 22, 2017, 6:46pm UTC](https://discuss.elastic.co/t/type-query-versus--search-within-a-specified-type/72802/2 "2017-02-22T18:46:35Z")

</div>

Closed on February 22, 2017, 6:46pm UTC

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