一、SOLR4.2集成NUTCH1.6 java
wget http://archive.apache.org/dist/lucene/solr/4.2.0/solr-4.2.0.tgz git
tar -xzvf solr-4.2.0.tgz github
cd solr-4.2.0/example apache
复制nutch的conf目录中的schema-solr4.xml文件到solr/collection1/conf目录,更名为schema.xml,覆盖原来文件 服务器
修改solr/collection1/conf/schema.xml,在<fields>下增长:<field name="_version_" type="long" indexed="true" stored="true"/> spa
二、给SOLR4.2配置中文分词器word分词 插件
参考https://github.com/ysc/word的Solr插件部分 xml
三、运行SOLR4.2 索引
启动SOLR4.2服务器: java -jar start.jar & get
SOLR4.2 Web界面: http://host2:8983
四、运行NUTCH提交索引
运行solrindex命令:
bin/nutch solrindex http://host2:8983/solr data/crawldb -linkdb data/linkdb -dir data/segments