继吉 发表于 2017-12-19 08:43:51

安装和使用solr

  下载Solr:wget http://apache.fayea.com/lucene/solr/6.4.1/solr-6.4.1.tgz
  解压:tar -zxvf solr-6.4.1.tgz
  bin/solr start
  bin/solr create -c stdalone
  bin/post -c stdalone example/exampledocs/*.xml
  http://localhost:8983/solr/stdalone/select?q=video
  http://localhost:8983/solr/stdalone/select?q=video&fl=id,name,price
  http://localhost:8983/solr/stdalone/select?q=name:black
  http://localhost:8983/solr/stdalone/select?q=price:&fl=id,name,price
  http://localhost:8983/solr/stdalone/select?q=price:&fl=id, name,price&facet=true&facet.field=cat
  bin/solr stop
  bin/solr -e cloud

  bin/solr status
  bin/solr healthcheck -c gettingstarted
  bin/post -c gettingstarted example/exampledocs/*.xml
  http://localhost:8983/solr/gettingstarted/select?q=price:&fl=id,%20name,price&facet=true&facet.field=cat
  bin/solr stop -all
  bin/solr -e cloud -noprompt
页: [1]
查看完整版本: 安装和使用solr