# What I specify a doc with a field other than '\_id'?

**URL:** <https://discuss.elastic.co/t/what-i-specify-a-doc-with-a-field-other-than-id/215736>\
**Category:** Elasticsearch\
**Created:** [January 20, 2020, 12:24pm UTC](https://discuss.elastic.co/t/what-i-specify-a-doc-with-a-field-other-than-id/215736 "2020-01-20T12:24:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![khalidnajm](https://avatars.discourse-cdn.com/v4/letter/k/e8c25b/32.png) [@khalidnajm](https://discuss.elastic.co/u/khalidnajm)\
**Post date:** [January 20, 2020, 12:24pm UTC](https://discuss.elastic.co/t/what-i-specify-a-doc-with-a-field-other-than-id/215736/1 "2020-01-20T12:24:39Z")

</div>

In the MLT query, in order to search by document, rather than terms, I know I can specify a document by its \_id. I find tedious, because I have to search for the document within the index and then copy other it's \_id to my MLT query. I would rather search by path.virtual, or something else that's easily-accessible.

Any advice?

```auto
GET doc_cat/_search
{
    "query": {
        "more_like_this" : {
            "fields" : ["content","file.content_type"],
            "like" :[
              {
                "_index" : "doc_cat",
                "_id" : "59ffedd643299d3fff1f43f2dd43fe3c"
              },
              {
                "_index" : "doc_cat",
                "_id" : "132c508aa6155c97206db951c4662987"
              }
              ]
        }
    }
}

```

---

<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 17, 2020, 12:24pm UTC](https://discuss.elastic.co/t/what-i-specify-a-doc-with-a-field-other-than-id/215736/2 "2020-02-17T12:24:45Z")

</div>

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