Cannot GET _source if _id has spaces in it

We have a document indexed with the _id field set to "STT -30247-010" (note the space).

We are unable to retrieve this document via the API (documents without spaces in the _id) work fine.

With a _search (q=_id="STT -30247-010") we can retrieve it.

Is there any way to retreive the document directly via the ID (not search)?

GET /myindex/_source/STT%20-30247-010 => 404
GET /myindex/_source/STT+-30247-010 => 404
GET /myindex/_source/STT -30247-010 => 404


I just tried this locally and it worked:

PUT foo/_doc/STT+-30247-010
  "key" : "value"

GET foo/_doc/STT+-30247-010

GET foo/_source/STT+-30247-010

GET foo/_search

what elasticsearch version are you testing against?


7.3 and now it's suddenly working today. Confused.

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