I kept getting the error "Could not find or load main class org.apache.solr.util.SolrCLI" while trying to setup SOLR on windows x64 machine.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
The resolution to the problem is really simple. 1)start solr. notice that you have to use solr.cmd instead of just solr
*bin/solr.cmd start*
2) then create the collection:
*bin/solr.cmd create -c gettingstarted -p 8983*
3) then add file/s to index using post tool. You can execute the post command in two ways
a)java -Dc=gettingstarted -jar post.jar *.json
or
b) bin/post -c gettingstarted example/exampledocs/books.json
Now you can navigate to your newly created collection 'gettingstarted' and query your books.
`http://localhost:8983/solr/#/gettingstarted/query'
Hope this saves someone's time.