Elasticsearch: Retrieve the document with the attachment content
This documentation is part of the Ingest Attachment Plugin guide. You can view the complete guide here: How to extract data from PPT, XLS, and PDF files to Elasticsearch.
👋 Welcome to the Stackhero documentation
Stackhero offers a fully managed Elasticsearch cloud service, designed for professionals who require reliable search, analytics, and logging at scale.
- Consistent performance and enhanced security with a private, dedicated infrastructure.
- Easily set up a custom domain name secured by HTTPS.
Get started quickly and focus on your business: you can have a production-ready Elasticsearch cloud hosting environment in around 5 minutes, with routine maintenance and security managed for you.
To view the processed document, retrieve it using its ID:
GET my_index/_doc/my_id
The response should look similar to the following:
{
"_index" : "my_index",
"_type" : "_doc",
"_id" : "my_id",
"_version" : 1,
"found" : true,
"_source" : {
"data" : "e1xydGYxXGFuc2kKVGhpcyBpcyB0aGUgY29udGVudCBvZiBhIFJURiBmaWxlClxwYXIgfQ==",
"attachment" : {
"content_type" : "application/rtf",
"language" : "en",
"content" : "This is the content of a RTF file",
"content_length" : 35
}
}
}
Notice that the _source field now includes both the original Base64 data and the extracted attachment details such as file type and content.