# Alternative to \_explain API for searching in a specific document, given a query

**URL:** <https://discuss.elastic.co/t/alternative-to--explain-api-for-searching-in-a-specific-document-given-a-query/94966>\
**Category:** Elasticsearch\
**Created:** [July 28, 2017, 2:11pm UTC](https://discuss.elastic.co/t/alternative-to--explain-api-for-searching-in-a-specific-document-given-a-query/94966 "2017-07-28T14:11:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![guilherme\_maranhao](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guilherme_maranhao/32/101483_2.png) [@guilherme\_maranhao](https://discuss.elastic.co/u/guilherme_maranhao)\
**Post date:** [July 28, 2017, 2:11pm UTC](https://discuss.elastic.co/t/alternative-to--explain-api-for-searching-in-a-specific-document-given-a-query/94966/1 "2017-07-28T14:11:56Z")

</div>

HI everybody,

I have a document and I would like to know if a specific query matches or not to it. The \_explain API returns a : `:matched` property which would be sufficient for me, but it also returns the `:explanation` object, which is a very big object and not necessary for my purpose.

Is there anything like

```
GET <index>/<type>/<ID>/_matches
{
    "query" : {
        "match" : { "message" : "<my query>" }
      }
}

```

Thanks a lot,

Guilherme

---

<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 25, 2017, 2:11pm UTC](https://discuss.elastic.co/t/alternative-to--explain-api-for-searching-in-a-specific-document-given-a-query/94966/2 "2017-08-25T14:11:58Z")

</div>

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