toastdriven/django-haystack — pull request #589 by mattdeboard (2012-06-19 17:53:36+00:00)
Title: Add support for Django ORM-like 'extras' method to specify extra search ...

...parameters that will not be processed in any way, except to be passed directly to Solr at search-time.

Added a test at ``LiveSolrSearchQuerySetTestCase.test_extra``.

The new test passes. I also tested as much of the tests on master branch as I could, but there were a few that I couldn't get to pass, likely due to a misconfiguration in Solr. The failures were constrained to ``more_like_this``-related tests I'm pretty confident they're not impacted by this change.

I should note that using this method may cause some unintended weirdness or create unhandled exceptions. It sprang out of a conversation with @acdha, and is definitely *caveat emptor*. That being said, in the case where you want to add arbitrary parameters to your query without modifying/subclassing Haystack classes, this will work well.