(三)—Nutch Solr安裝與配置

2018-07-31 14:18 更新

Solr是一款優(yōu)秀的基于Lucene的全文檢索服務(wù)器,它對(duì)Lucene進(jìn)行了擴(kuò)展,提供了非常豐富的查詢語(yǔ)言,并對(duì)查詢進(jìn)行了性能優(yōu)化。

1 Solr是什么?

Solr是一款優(yōu)秀的基于Lucene的全文檢索服務(wù)器,它對(duì)Lucene進(jìn)行了擴(kuò)展,提供了非常豐富的查詢語(yǔ)言,并對(duì)查詢進(jìn)行了性能優(yōu)化。

2 下載與安裝Solr

由于當(dāng)前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就配置完畢了,進(jìn)入solr-4.10.4/example目錄:

cd solr-4.10.4/example

啟動(dòng)Solr:

java –jar start.jar

此時(shí)就可以通過(guò)瀏覽器訪問(wèn)8983端口,查看Solr的控制界面:

http://192.168.1.11:8983/solr

以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)