# \_id is not recognized in index

**URL:** <https://forum.opensearch.org/t/id-is-not-recognized-in-index/12338>\
**Category:** General Feedback\
**Created:** [January 31, 2023, 8:57pm UTC](https://forum.opensearch.org/t/id-is-not-recognized-in-index/12338 "2023-01-31T20:57:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![devep](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@devep](https://forum.opensearch.org/u/devep)\
**Post date:** [January 31, 2023, 8:57pm UTC](https://forum.opensearch.org/t/id-is-not-recognized-in-index/12338/1 "2023-01-31T20:57:06Z")

</div>

when i query by  
GET /testing\_large\_midlines\_k\_1/\_doc/4112-2004|1838-45840835-20639-26|1-347571527  
OpenSearch not able to recognize the id  
{  
“\_index” : “testing\_large\_midlines\_k\_1”,  
“\_type” : “\_doc”,  
“\_id” : “4112-2004|1838-45840835-20639-26|1-347571527”,  
“found” : false  
}

but when i query with  
GET /testing\_large\_midlines\_k\_1/\_search?  
{  
“query”: {  
“terms”: {  
“\_id”: [“4112-2004|1838-45840835-20639-26|1-347571527”]  
}  
}  
}

it recognizes the id :  
{  
“took” : 65,  
“timed\_out” : false,  
“\_shards” : {  
“total” : 5,  
“successful” : 5,  
“skipped” : 0,  
“failed” : 0  
},  
“hits” : {  
“total” : {  
“value” : 1,  
“relation” : “eq”  
},  
“max\_score” : 1.0,  
“hits” : [  
{  
“\_index” : “testing\_large\_midlines\_k\_1”,  
“\_type” : “\_doc”,  
“\_id” : “4112-2004|1838-45840835-20639-26|1-347571527”,  
“\_score” : 1.0,

I am trying to check multiple id with \_mget request, but some reason it always returns false.

Thank you.

---

<div class="post-metadata">

**Author:** ![AESthetix256](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/aesthetix256/32/4680_2.png) [@AESthetix256](https://forum.opensearch.org/u/AESthetix256)\
**Post date:** [February 1, 2023, 8:18am UTC](https://forum.opensearch.org/t/id-is-not-recognized-in-index/12338/2 "2023-02-01T08:18:08Z")

</div>

Hello @devep,

what Version of OpenSearch are you using and where from are you attempting to get the document?

I just created a doc with the same ID on my OpenSearch 2.5 Instance and was able to retrieve it using the same query you provided using the DevTools Interface in Dashboards:

 ![ss](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/4/41556aa44f8fb34a0b80cec7b45fa2b57e5a0073.png)

BR,  
Andreas

---

<div class="post-metadata">

**Author:** ![devep](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@devep](https://forum.opensearch.org/u/devep)\
**Post date:** [February 11, 2023, 1:00am UTC](https://forum.opensearch.org/t/id-is-not-recognized-in-index/12338/3 "2023-02-11T01:00:23Z")

</div>

issue was I am using routing id while creating document and didn’t add routing in query.

if I use query like this, getting the results.

GET /testing\_large\_midlines\_k\_1/\_doc/14829-20|404|1567-48795224-656-103|1952-34148457?routing=805B-HS60-Y87G-B0MX-00000-00
