居然是你

mapper-attachment插件索引数据问题

Elasticsearch | 作者 leiyazhen | 发布于2016年02月23日 | 阅读数:3900

设置映射
PUT /test/person/_mapping { "person": { "properties": { "file": { "type": "attachment", "fields": { "content": { "type": "string", "term_vector":"with_positions_offsets", "store": true } } } } } }
再 GET映射会发现如github上关于mapper-attachment说明所说会自动增加其他meta data如title、name等字段。
想利用这些字段,比如说在title字段中存储标题,尝试了各种索引数据的json都提示错误,因为我设置了dynamic为strict,不设置动态映射的话,会自动增加另外一个title字段,求各位指点怎么利用默认创建的meta data映射来存储数据
已邀请:

meteor

赞同来自:

据我所知, mapping要自己定义的.
https://www.elastic.co/guide/e ... .html

要回复问题请先登录注册