错误如下
HTTP Status 500 - Request processing failed; nested exception is org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://localhost:8983/solr/techproducts: Expected mime type application/octet-stream but got text/html.
解决方法,启动命令使用
./solr start -e techproducts
错误分析
Solr Quick Start是用这个命令启动的
./solr start -e cloud -noprompt
Using SolrJ文档中是这样描述的
Single node Solr client
String urlString = "http://localhost:8983/solr/techproducts";
SolrClient solr = new HttpSolrClient.Builder(urlString).build();