Apache Solr quickstart tutorial - error while load

2019-03-02 20:00发布

I am following Apache Solr quickstart tutorial. The tutorial comes across indexing a directory of rich files which requires implementing java -Dauto -Drecursive org.apache.solr.util.SimplePostTool docs/ .

I am getting an error which says: Could not find or load main class org.apache.solr.util.SimplePostTool inspite of following the quickstart tutorial closely. I am not getting how to resolve the error and proceed ahead with the tutorial.

2条回答
Melony?
2楼-- · 2019-03-02 20:35

I implemented java -classpath dist/solr-core-*jar -Dauto -Drecursive org.apache.solr.util.SimplePostTool docs/ rather than java -Dauto -Drecursive org.apache.solr.util.SimplePostTool docs/. The latter assumes that you have already set the environment for SimplePostTool using export CLASSPATH=dist/solr-core-4.10.2.jar whereas if you do not set the environment, there is no option other than implementing java -classpath dist/solr-core-*jar -Dauto -Drecursive org.apache.solr.util.SimplePostTool docs/

Thanks to the Apache user mailing list.

查看更多
劳资没心,怎么记你
3楼-- · 2019-03-02 20:47

This one worked for me

java -classpath example\exampledocs\post.jar -Dauto=yes -Dc=gettingstarted -Ddata=files -Drecursive=yes org.apache.solr.util.SimplePostTool docs/

查看更多
登录 后发表回答