安装
cd /soft
wget https://mirrors.tuna.tsinghua.edu.cn/apache/lucene/solr/5.5.3/solr-5.5.3.tgz
tar zxvf solr-5.5.3.tgz
cd solr-5.5.3
启动
bin/solr start -e cloud -noprompt
导入文件建立索引
bin/post -c gettingstarted docs/
增删查改
查询:http://192.168.12.240:8983/solr/gettingstarted/query?q=solr
bin/post -c gettingstarted example/exampledocs/books.json
bin/post -c gettingstarted example/exampledocs/books.csv
bin/post -c gettingstarted -d "<delete><id>SP2514N</id></delete>"
创建Collection命令
http://192.168.12.240:8983/solr/admin/collections?action=CREATE&name=fas&numShards=2&replicationFactor=2&maxShardsPerNode=2
删除Collection命令
http://192.168.12.240:8983/solr/admin/collections?action=DELETE&name=fas