-
Notifications
You must be signed in to change notification settings - Fork 340
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
Unable to create a core #318
Comments
I'm experiencing this same issue on:
Did the requests library change how it handles its |
Here's an example without modifying import pysolr
admin = pysolr.SolrCoreAdmin('http://localhost:8983/solr/admin/cores')
resp = admin.create('mytest')
print(resp) This will print: {
"responseHeader":{
"status":0,
"QTime":0},
"initFailures":{},
"status":{}} And Solr will log:
Solr did not attempt to create the mytest core. It does not appear to be passing the expected parameters in the request. Now if I modify {
"responseHeader":{
"status":400,
"QTime":6},
"error":{
"metadata":[
"error-class","org.apache.solr.common.SolrException",
"root-error-class","org.apache.solr.core.SolrResourceNotFoundException"],
"msg":"Error CREATEing SolrCore 'mytest': Unable to create core [mytest] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/var/solr/data/cores/mytest'",
"code":400}} And Solr will log:
This error is the expected behavior. Solr is now attempting to create the mytest core but I never created solrconfig.xml. |
I have
Expected behaviour
pysolr creates a new core
Actual behaviour
pysolr does not create a core
Steps to reproduce the behaviour
Configuration
Could fix it with
replaced: https://github.com/django-haystack/pysolr/blob/master/pysolr.py#L1307
resp = requests.get(url, data=safe_url_encode(params), headers=headers)
with
resp = requests.get(url, data=params, headers=headers)
The text was updated successfully, but these errors were encountered: