在本地搭建了solr,结果报异常:
org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Expected mime type application/octet-stream but got text/html
查资料发现是solrsever的地址出现问题:
原来是:http://localhost:8080/solr/#/collection2
结果发现,需要指定solrcore,并且地址中没有#号
就是solr管理页面上的#号需要去掉,像这样:http://localhost:8080/solr/collection2