Elasticsearch-mapper-attachments where is the text content stored?

Hi,

I'm using the elasticsearch-mapper-attachments plugin and I would like to also see the TIKA converted text content as part of the document. I have tried the following mapping without success:

curl -X PUT "localhost:9200/test" -H 'Content-Type: application/json' -d'
{
"mappings": {
"person" : {
"properties" : {
"copy":{type:"string"},
"file" : {
"type" : "attachment",
"fields" : {
"content" : {"store" : true,type:"string", "copy_to":"copy"},
"title" : {"store" : true},
"date" : {"store" : true},
"keywords" : {"store" : true},
"content_type" : {"store" : true},
"content_length" : {"store" : true},
"language" : {"store" : true}
}
}
}
}
}
}
'
The text content is not available in the "copy" field not in the file.content. Is there a way to have the text content stored?

You can mark the field as stored. It's in the documentation IIRC.
But anyway this plugin has been removed in recent versions so don't use it.

Use ingest-attachment instead.

Hi according to me the content field is marked as stored but I guess you mean that I should mark the copy field as stored,. I'll give it a try.
I'm using ES 2.4.6 can I use the ingest-attachment on this version?

Thanks,
Emanouil

I think ingest came out in 5.0.
It's time for you to upgrade instead of investing time on deprecated/removed features I guess.

As the content field is stored you can just retrieve its content without having to copy to (which is not supported in this context IIRC)

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