1

I'm trying to copy the collection_title field to a title field using copy_to. This does nothing whatsoever:

mappings dynamic: 'false' do
  indexes :collection_title,      type: 'string', copy_to: 'title'
end

I'm using the collection of elasticsearch gems: elasticsearch-rails, elasticsearch-model, and elasticsearch-api.

Val
  • 207,596
  • 13
  • 358
  • 360
Bailey Smith
  • 2,853
  • 4
  • 27
  • 39

1 Answers1

1

It seems you have not declared your title field in your mapping. If you declare it like this, it should work:

mappings dynamic: 'false' do
  indexes :collection_title, type: 'string', copy_to: 'title'
  indexes :title, type: 'string'
end
Val
  • 207,596
  • 13
  • 358
  • 360