我正在尝试使用elasticsearch(版本2.33)在文件中查找字符串, 我试图创建映射来存储多个文件,但它总是给我相同的错误, 这是我到目前为止所做的:
PUT /消息
PUT / messages / attachment / _mapping
DATA:
{
"attachment": {
"properties": {
"my_attachment": {
"type": "nested",
"include_in_parent": true,
"properties": {
"attachmentContent": {
"type": "attachment",
"path": "full",
"fields": {
"attachmentContent": {
"type": "string",
"term_vector": "with_positions_offsets",
"store": true
}
}
},
"path": {
"type": "string"
},
"attachment_id": {
"type": "integer"
}
}
}
}
}
}
总是给我同样的错误:
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "Mapping definition for [fields] has unsupported parameters: [attachmentContent : {type=string}]"
}
],
"type": "mapper_parsing_exception",
"reason": "Mapping definition for [fields] has unsupported parameters: [attachmentContent : {type=string}]"
},
"status": 400
}
尝试按照评论中的说明进行操作 http://grokbase.com/t/gg/elasticsearch/148v29ymaf/how-can-we-index-array-of-attachments 并且它无法正常工作
感谢任何帮助,Nevo:)