With these models:
class Entity include Mongoid::Document has_one :search_index, :as => :searchable end class EntityRef include Mongoid::Document has_one :search_index, :as => :searchable end class SearchIndex include Mongoid::Document belongs_to :searchable, :polymorphic => true end
If I do EntityRef.first.search_index, I see this in the log:
MONGODB app_development['search_indices'].find(
{"searchable_id"=>"/m/011p0w"})
The find is using only the polymorphic id field, not type. I think it should!