Elastic search and attachment-mapping

Hello,

Trying to figure out how to use the attachment mapping by reading the readme: https://github.com/elastic/elasticsearch-mapper-attachments

Are the fields of the mapping documented anywhere? For example, what does it mean when you map "store": true ? does it not store the content by default?

What does "path": full mean?

The (documentation) link in the first link on the readme is broken.

regards
Adisa

Make sure that you are reading the right version depending on your elasticsearch version:

path full does not exist anymore in 2.0

Oh and by the way the documentation link is broken because we did not merge yet this PR: https://github.com/elastic/elasticsearch/pull/14624

Thank you for this. I was originally looking at the 1.6.0 github repo when i was jotting down my questions.

Is the store: field deprecated as well? If not, what does it mean?

Also, once you index the base64 encoded content, it seems like the encoded content is what will be returned when you do _search request on sense. And views like kibana also displays the content encoded.

I was only able to get the decoded content returned in sense when i enable highlight. Is this the correct behavior?

No. See store | Elasticsearch Guide [8.11] | Elastic

Yes. Elasticsearch gives you back what you sent as in _source. No less. No more.

BTW you can also get the indexed content back without using highlighting but by storing the field and explicitly ask for it in your search request.

thanks.

So i tried your suggestion, still comes out encoded. Please see below interpretation of ur suggestion.

POST /trying-out-mapper-attachments
{
"mappings": {
"person": {
"properties": {
"cv": {
"type": "attachment",

    }

}
}
}
}

PUT /trying-out-mapper-attachments/person/1
{
"cv":"e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0="

}

GET /trying-out-mapper-attachments/person/_search?q=cv:ipsum

returns cv encoded.

I meant using that: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-fields.html