Solr基础操作4

2022-06-29 22:32:18 浏览数 (1)

索引JSON

root@h102 solr-5.3.0# bin/post -c gettingstarted example/exampledocs/books.json

java -classpath /data/solr/solr-5.3.0/dist/solr-core-5.3.0.jar -Dauto=yes -Dc=gettingstarted -Ddata=files org.apache.solr.util.SimplePostTool example/exampledocs/books.json

SimplePostTool version 5.0.0

Posting files to base url http://localhost:8983/solr/gettingstarted/update...

Entering auto mode. File endings considered are xml,json,csv,pdf,doc,docx,ppt,pptx,xls,xlsx,odt,odp,ods,ott,otp,ots,rtf,htm,html,txt,log

POSTing file books.json (application/json) to base

1 files indexed.

COMMITting Solr index changes to http://localhost:8983/solr/gettingstarted/update...

Time spent: 0:00:05.241

root@h102 solr-5.3.0#

索引CSV

root@h102 solr-5.3.0# bin/post -c gettingstarted example/exampledocs/books.csv

java -classpath /data/solr/solr-5.3.0/dist/solr-core-5.3.0.jar -Dauto=yes -Dc=gettingstarted -Ddata=files org.apache.solr.util.SimplePostTool example/exampledocs/books.csv

SimplePostTool version 5.0.0

Posting files to base url http://localhost:8983/solr/gettingstarted/update...

Entering auto mode. File endings considered are xml,json,csv,pdf,doc,docx,ppt,pptx,xls,xlsx,odt,odp,ods,ott,otp,ots,rtf,htm,html,txt,log

POSTing file books.csv (text/csv) to base

1 files indexed.

COMMITting Solr index changes to http://localhost:8983/solr/gettingstarted/update...

Time spent: 0:00:00.512

root@h102 solr-5.3.0#

0 人点赞