Skip to content

Commit 3c8e052

Browse files
miguelffkarmi
authored andcommitted
[MODEL] Revert multiple_adapter to lookup over Registry instead of models reader
Related: elastic#10, elastic#30, elastic#50, elastic#129, elastic#346
1 parent 1d71fba commit 3c8e052

File tree

1 file changed

+1
-1
lines changed
  • elasticsearch-model/lib/elasticsearch/model/adapters

1 file changed

+1
-1
lines changed

elasticsearch-model/lib/elasticsearch/model/adapters/multiple.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def __ids_by_type
110110
def __type(hit)
111111
@@__types ||= {}
112112
@@__types[[hit[:_index], hit[:_type]].join("::")] ||= begin
113-
models.detect { |model| model.index_name == hit[:_index] && model.document_type == hit[:_type] }
113+
Registry.all.detect { |model| model.index_name == hit[:_index] && model.document_type == hit[:_type] }
114114
end
115115
end
116116

0 commit comments

Comments
 (0)