MCPcopy Create free account
hub / github.com/django-haystack/django-haystack / run

Method run

haystack/backends/solr_backend.py:935–949  ·  view source on GitHub ↗

Builds and executes the query. Returns a list of search results.

(self, spelling_query=None, **kwargs)

Source from the content-addressed store, hash-verified

933 return search_kwargs
934
935 def run(self, spelling_query=None, **kwargs):
936 """Builds and executes the query. Returns a list of search results."""
937 final_query = self.build_query()
938 search_kwargs = self.build_params(spelling_query, **kwargs)
939
940 if kwargs:
941 search_kwargs.update(kwargs)
942
943 results = self.backend.search(final_query, **search_kwargs)
944
945 self._results = results.get("results", [])
946 self._hit_count = results.get("hits", 0)
947 self._facet_counts = self.post_process_facets(results)
948 self._stats = results.get("stats", {})
949 self._spelling_suggestion = results.get("spelling_suggestion", None)
950
951 def run_mlt(self, **kwargs):
952 """Builds and executes the query. Returns a list of search results."""

Callers

nothing calls this directly

Calls 6

build_paramsMethod · 0.95
getMethod · 0.80
post_process_facetsMethod · 0.80
build_queryMethod · 0.45
updateMethod · 0.45
searchMethod · 0.45

Tested by

no test coverage detected