I'm using the 'elasticsearch-rails' gem and trying to map two Ruby on Rails models, let's call them A and B, into a shared Elasticsearch index for efficient searching. The challenge I'm facing is that both models have similar attributes, like 'title' for Elasticsearch, but they are named differently ('about' in model A and 'name' in model B).
I would appreciate any guidance on how to create a unified structure in Elasticsearch that handles this mapping effectively. Specifically, I'm looking for advice on how to:
Map the 'about' attribute from model A and the 'name' attribute from model B to the 'title' field in Elasticsearch.
Configure the 'elasticsearch-rails' gem to properly index and search this shared index while considering the attribute differences.
Thank you in advance for any assistance you can provide!
Hello,
I'm using the 'elasticsearch-rails' gem and trying to map two Ruby on Rails models, let's call them A and B, into a shared Elasticsearch index for efficient searching. The challenge I'm facing is that both models have similar attributes, like 'title' for Elasticsearch, but they are named differently ('about' in model A and 'name' in model B).
I would appreciate any guidance on how to create a unified structure in Elasticsearch that handles this mapping effectively. Specifically, I'm looking for advice on how to:
Thank you in advance for any assistance you can provide!