I'd like to use Join datatype.
I tried like as below.
settings index: {number_of_shards: 1, max_result_window: 10000000, } do
mappings dynamic: 'false' do
indexes :my_join_field, type: "join" do
indexes :relation, { "question" => "answer" }
end
I got error.
{"type":"mapper_parsing_exception","reason":"Mapping definition for [my_join_field] has unsupported parameters: [fields : {relation={question=answer, type=text}}]"}}
How can I resolve that?
You can see an example of how it can be done in https://github.com/elastic/elasticsearch-rails/blob/master/elasticsearch-model/spec/support/app/parent_and_child_searchable.rb and https://github.com/elastic/elasticsearch-rails/blob/master/elasticsearch-model/spec/elasticsearch/model/adapters/active_record/parent_child_spec.rb
Thank you!
Most helpful comment
You can see an example of how it can be done in https://github.com/elastic/elasticsearch-rails/blob/master/elasticsearch-model/spec/support/app/parent_and_child_searchable.rb and https://github.com/elastic/elasticsearch-rails/blob/master/elasticsearch-model/spec/elasticsearch/model/adapters/active_record/parent_child_spec.rb