我正在尝试使用copy_to将collection_title字段复制到title字段。这不会做任何事情:
mappings dynamic: 'false' do
indexes :collection_title, type: 'string', copy_to: 'title'
end我使用的是elasticsearch gem的集合: elasticsearch-rails、elasticsearch-model和elasticsearch-api。
发布于 2015-11-26 12:56:05
您似乎没有在映射中声明您的title字段。如果你像这样声明它,它应该是有效的:
mappings dynamic: 'false' do
indexes :collection_title, type: 'string', copy_to: 'title'
indexes :title, type: 'string'
endhttps://stackoverflow.com/questions/33928478
复制相似问题