Document ID

Where exactly do I get the ID of an Elasticsearch document? I need it for the R module I'm using with Elasticsearch to import data. When I do a GET query, I only see the IDs of each log within the document. See attached screenshot.

This has been indexed with Logstash.

Hi,

I'm not exactly sure I understand the question. The id of an elasticsearch document is what you get with the _id field, which is visible in your example. For the logging use case, most of the time each line in a log file gets indexed as a single document in elasticsearch, so you won't have another ID for the source document unless you store it in some field alongside your log lines.
Please let me know if I missunderstood something.

The whole index is called 'logstash-templightlogs' and is of the type 'sample'. The thing is, I need to provide the ID of this index if I want to import all the logs into my RStudio. Therefore, the whole thing 'logstash-templightlogs' needs an ID. As of now it has an autogenerated UUID which is not good enough for R.

I don't understand. Elasticsearch indexes don't have IDs, they have unique names and can't be renamed. Documents in an index have IDs, but default autogenerated but you can set them to an explicit value if you prefer.