-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop solr451 #1648
Drop solr451 #1648
Conversation
The biggest issue was that cjson will probably not be available for py3 # AGProjects/python-cjson#6
Forum solr tests require this field
The failing tests are because of a change in the exception that gets raised in the case of a connection error. In current freesound, almost all operations that connect to solr have a try/except/pass block: Lines 180 to 184 in 417f641
In fact, when running tests these exceptions have always been raised, as we have no way of disabling index-to-solr during tests. It was just luck that the solr 451 custom backend raised a It seems that tests were running with the solr451 backend, rather than the solr5 pysolr backend. Now with pysolr, the The easiest immediate fix for this to get us back to where we were would be to correctly catch SolrError and re-throw it as a SearchEngineException. In the long-term we should decide if we want to run solr during tests or not. |
2473feb
to
a55110f
Compare
The two classes that were remaining in solr451custom were common utils for use in the solr backend, so rename the file to better reflect its purpose instead of copying the definitions in to the solr backend. Remove the custom SolrQueryPySolr class, as this was only needed to separate it from the custom backend, which is no longer used. Rename the as_dict method to as_kwargs to better reflect its purpose.
This class reimplemented the behaviour of the doseq=True parameter, converting {"a", [1,2]} into &a=1&a=2 This syntax was previously used in the custom solr backend, but since we started using pysolr we now use the to_kwargs method to serialise the parameters in the SolrQuery object
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests pass, and I was able to run this code and get search results. looks good, thanks!
Issue(s)
#1083
Description
bring changes that remove Solr4 from #1614 to a separate PR.
Deployment steps: