1. Add some testing data to solr
open command prompt, and cd D:\solr_home\exampledocs
D:\solr_home\exampledocs>java -Durl=http://localhost:8080/solr/update -jar post jar *xml
If you can see the following information, adding index is successfully.
SimplePostTool version 1.5
Posting files to base url [http://localhost:8080/solr/update|http://localhost:8080/solr/update] using content-type
pplication/xml..
POSTing file gb18030-example.xml
POSTing file hd.xml
POSTing file ipod_other.xml
POSTing file ipod_video.xml
POSTing file manufacturers.xml
POSTing file mem.xml
POSTing file money.xml
POSTing file monitor.xml
POSTing file monitor2.xml
POSTing file mp500.xml
POSTing file sd500.xml
POSTing file solr.xml
POSTing file utf8-example.xml
POSTing file vidcard.xml
14 files indexed.
COMMITting Solr index changes to [http://localhost:8080/solr/update|http://localhost:8080/solr/update]..
Here, if use command D:\solr_home\exampledocs>java -jar post jar *xml
will has the error SimplePostTool: FATAL: IOException while posting data: java.net.ConnectException: Connection refused: connect
that's because solr uses default port 8983, here is using port 8080. 2. modify configuration
open file D:\solr_home\solr\collection1\conf\solrconfig.xml
add configuration: