running Solr in Docker container and accessing it using sunspot_rails gem. Created empty core in Solr container:
solr create -c app
this is my sunspot.yaml
production:
solr:
hostname: solr
port: 8983
log_level: WARNING
path: /solr/app
when I run rake sunspot:solr:reindex getting this error:
RSolr::Error::Http: RSolr::Error::Http - 400 Bad Request
Error: {
"responseHeader":{
"status":400,
"QTime":1},
"error":{
"metadata":[
"error-class","org.apache.solr.common.SolrException",
"root-error-class","org.apache.solr.common.SolrException"],
"msg":"undefined field type",
"code":400}}
URI: http://solr:8983/solr/app/update?wt=json
Request Headers: {"Content-Type"=>"application/json"}
Request Data: "{\"delete\":{\"query\":\"type:Form\"}}"
How to reindex with the empty core?
Solved this problem using
recipedude/solr-sunspotDocker image. Read more about this issue: