Solr是一款優(yōu)秀的基于Lucene的全文檢索服務器,它對Lucene進行了擴展,提供了非常豐富的查詢語言,并對查詢進行了性能優(yōu)化。
Solr是一款優(yōu)秀的基于Lucene的全文檢索服務器,它對Lucene進行了擴展,提供了非常豐富的查詢語言,并對查詢進行了性能優(yōu)化。
由于當前Solr已經(jīng)到了5.x版本,而Nutch1.10支持的最高版本是4.x,因此,需要到http://archive.apache.org/dist/lucene/solr/下載Solr的4.x的歷史版本。本教程使用的版本是4.10.4,下載的軟件包名為solr-4.10.4.zip。下載Solr:
wget http://archive.apache.org/dist/lucene/solr/4.10.4/solr-4.10.4.zip
解壓:
unzip solr-4.10.4.zip
得到文件夾solr-4.10.4,將Nutch目錄下的runtime/local/conf/schema-solr4.xml拷貝到solr的配置文件目錄example/solr/collection1/conf下:
cp apache-nutch-1.10/runtime/local/conf/schema-solr4.xml solr-4.10.4/example/solr/collection1/conf
刪除solr原schema.xml文件:
rm –f solr-4.10.4/example/solr/collection1/conf/schema.xml
將schema-solr4.xml改名為schema.xml:
mv solr-4.10.4/example/solr/collection1/conf/ schema-solr4.xml solr-4.10.4/example/solr/collection1/conf/ schema.xml
到此,Solr就配置完畢了,進入solr-4.10.4/example目錄:
cd solr-4.10.4/example
啟動Solr:
java –jar start.jar
此時就可以通過瀏覽器訪問8983端口,查看Solr的控制界面:
更多建議: