Description
Expected Behavior
That there is an index created with a parent child relationship using the join field.
Current Behavior
When running create_index! and error is returned.
Elasticsearch::Transport::Transport::Errors::BadRequest` ([400] {"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters: [author : {type=text}] [text : {type=text}] [title : {type=text}] [join_field : {type=join, relations={question=answer}}]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters: [author : {type=text}] [text : {type=text}] [title : {type=text}] [join_field : {type=join, relations={question=answer}}]","caused_by":{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters: [author : {type=text}] [text : {type=text}] [title : {type=text}] [join_field : {type=join, relations={question=answer}}]"}},"status":400})
Steps to Reproduce
- Copy question.rb, answer.rb and parent_and_child_searchable.rb from the examples folder on this repository to a Rails 4.2.11.3 project
- In Rails console:
require "parent_and_child_searchable"
- In Rails console: create an question and answer
- In Rails console:
ParentChildSearchable.create_index!
- Watch everything explode
Context (Environment)
Using Rails 4.2.11.3 and 6.2
Tried using Elasticsearch 7.6.2 and 7.5.2 same result for both versions
Ruby 2.6.0
gems:
elasticsearch-rails 7.1.1
elasticsearch-model 7.1.1