In a elastictastic model, "embed" is used to set the properties of embedded document. But along with this is there any way to set the type of the embedded document as nested. For example
When I have A.rb as
class User
include Elastictastic::Document
embed :tags, class_name: "Tag"
end
With this I am getting the mapping of A as:
{"a"=>
{"properties"=>
"tags"=>
{"properties"=>
{"tag_type"=>{"type"=>"string"}, "tag_value"=>{"type"=>"string"}}}}}}
What should I do when I want to set the mapping as below:
{"a"=>
{"properties"=>
{"user_id"=>{"type"=>"string"},
"college_id"=>{"type"=>"string"},
"verified_user"=>{"type"=>"boolean"},
"user_type"=>{"type"=>"string"},
"tags"=>{
"type":"nested"
"properties"=>
{"tag_type"=>{"type"=>"string"}, "tag_value"=>{"type"=>"string"}}}}}}
--
Thanks,
Aash