MCPcopy Index your code
hub / github.com/django-haystack/django-haystack / _load_model_objects

Method _load_model_objects

haystack/query.py:205–214  ·  view source on GitHub ↗
(self, model, pks)

Source from the content-addressed store, hash-verified

203 return to_cache
204
205 def _load_model_objects(self, model, pks):
206 try:
207 ui = connections[self.query._using].get_unified_index()
208 index = ui.get_index(model)
209 objects = index.read_queryset(using=self.query._using)
210 return objects.in_bulk(pks)
211 except NotHandled:
212 self.log.warning("Model '%s' not handled by the routers.", model)
213 # Revert to old behaviour
214 return model._default_manager.in_bulk(pks)
215
216 def _fill_cache(self, start, end, **kwargs):
217 # Tell the query where to start from and how many we'd like.

Callers 1

post_process_resultsMethod · 0.95

Calls 3

get_unified_indexMethod · 0.80
get_indexMethod · 0.45
read_querysetMethod · 0.45

Tested by

no test coverage detected