I try to map the field as user defined field - "attachment" in elastic search like below
"file": {
"type": "attachment",
"fields": {
"content": {
"type": "text"
},
"author": {
"type": "text",
"store": true
}
}
Attachment mapping like below,
"attachment": {
"properties": {
"author": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"content": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
But I am getting the following error :
java.util.concurrent.ExecutionException: RemoteTransportException[[3cfb4e163654][172.17.0.2:9300][indices:admin/create]]; nested: MapperParsingException[Failed to parse mapping [mappings]: No handler for type [attachment] declared on field [file]]; nested: MapperParsingException[No handler for type [attachment] declared on field [file]];
[Failed to parse mapping [mappings]: No handler for type [attachment] declared on field [file]]
I already have the ingest attachment plugin added to the elastic search plugin and it is available when I list the plugin in elastic search.
What is wrong with my mapping?
Please help me on this ?
Thanks,
Harry
mapping
is partial. @harry add mapping forfile
inattachment
– Gibbs