It used to be that this would work:
{
"file" : {
"properties" : {
"attachment" : {
"type" : "attachment",
"path" : "full",
"fields": {
"attachment": {
"type": "string",
"term_vector": "with_positions_offsets",
"store": true
}
}
}
}
}
But since upgrading to ES 2.0 from 1.5.2, when trying to create the index, I get the following error:
MapperParsingException[Mapping definition for [fields] has unsupported parameters: [attachment : {type=string}]];
The current README for the plugin shows under 'fields' instead of 'attachment' (or whatever you name your attachment) you need to use 'content'.
You also have to change everywhere you refer to the attachment.
-
What caused this change? Was this intentional?
-
Before this change, it seemed that the entire attachments was stored and accessible via 'attachment' as the only field name. What was going on? Was the content being mapped to the name 'attachment' so you wouldn't need to reference it by 'attachment.content'?