My solr server is running, and following is my client code:
File file = new File("1.pdf");
String urlString = constant.getUrl();
StreamingUpdateSolrServer solr = new
StreamingUpdateSolrServer(
urlString, 1, 1);
ContentStreamUpdateRequest up = new
ContentStreamUpdateRequest(
"/update/extract");
up.addFile(file);
up.setParam("uprefix", "attr_");
up.setParam("fmap.content", "attr_content");
up.setParam("literal.id", file.getPath());
up.setAction(AbstractUpdateRequest.ACTION.COMMIT,
false, false);
solr.request(up);
solr.blockUntilFinished();
When I execute the code, it always meet the error:
Index starting......
org.apache.solr.common.SolrException: Internal Server Error
Internal Server Error
request:
http://localhost:8080/solr/update/extract?uprefix=attr_&fmap.content=attr_content&literal.id=1.pdf&commit=true&waitFlush=false&waitSearcher=false&wt=javabin&version=2
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:460)
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:254)
at
org.apache.solr.client.solrj.impl.StreamingUpdateSolrServer.request(StreamingUpdateSolrServer.java:202)
at com.kevin.solr.task.MainIndexTask.createIndex(MainIndexTask.java:31)
at com.kevin.solr.task.MainIndexTask.main(MainIndexTask.java:42)
Why? Could anyone help me?
Thanks very much.
--
View this message in context:
http://lucene.472066.n3.nabble.com/org-apache-solr-common-SolrException-Internal-Server-Error-tp3848597p3848597.html
Sent from the Solr - User mailing list archive at Nabble.com.