Skip to content

Commit 9867b29

Browse files
committed
Solr backend: run() kwargs are passed directly to search backend
This allows customization by subclasses and also fixes django-haystack#888 by ensuring that the custom field list prepared by `ValuesQuerySet` and `ValuesListQuerySet` is actually used.
1 parent f7d4fad commit 9867b29

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

haystack/backends/solr_backend.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,9 @@ def run(self, spelling_query=None, **kwargs):
690690
final_query = self.build_query()
691691
search_kwargs = self.build_params(spelling_query, **kwargs)
692692

693+
if kwargs:
694+
search_kwargs.update(kwargs)
695+
693696
results = self.backend.search(final_query, **search_kwargs)
694697
self._results = results.get('results', [])
695698
self._hit_count = results.get('hits', 0)

0 commit comments

Comments
 (0)