CentOS nutch solr 集成问题 (二 )
2014-07-12 16:38
501 查看
前言: 对的版本是最好的,不要总想着最新的.
以下配置问题不行,直到把solr退到3.x,好了.
################################################################
##### ##########
#### ##########
#############################################################
1. 首先安装好java,并配置好环境:
yum update
yum list java*
yum install java-1.7.0-openjdk-devel.x86_64
vi + /etc/profile
source /etc/profile
2. 然后,下载Solr(4.9),Nutch(1.8),各自解压.
复制 ${NUTCH_RUNTIME_HOME}/conf/schema.xml 到 ${APACHE_SOLR_HOME}/example/solr/conf/
到 ${APACHE_SOLR_HOME}/example 下去启动solr:
java -jar start.jar
3. 到 ${NUTCH_RUNTIME_HOME}/, index 数据到solr:
bin/crawl urls/seed.txt TestCrawl http://localhost:8983/solr/ 2
index之前,配置好抓数据的网址:
4. 问题遇到如下问题,放弃.
=============
====更新此问题20150326,后来看到解决方法:
http://sweblish.iteye.com/blog/1501700
在conf/nutch-default.xml中找到plugin.folders,修改value为绝对路径就好了.
======================
执行index动作的时候,出错:
SOLRIndexWriter
solr.server.url : URL of the SOLR instance (mandatory)
solr.commit.size : buffer size when sending to SOLR (default 1000)
solr.mapping.file : name of the mapping file for fields (default solrindex-mapping.xml)
solr.auth : use authentication (default false)
solr.auth.username : use authentication (default false)
solr.auth : username for authentication
solr.auth.password : password for authentication
Indexer: java.io.IOException: Job failed!
at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1357)
at org.apache.nutch.indexer.IndexingJob.index(IndexingJob.java:114)
at org.apache.nutch.indexer.IndexingJob.run(IndexingJob.java:176)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.nutch.indexer.IndexingJob.main(IndexingJob.java:186)
Solr也出错如下:
114484 [qtp1333371531-18] ERROR org.apache.solr.core.SolrCore ▒C org.apache.solr.common.SolrException: ERROR: [doc=http://nutch.apache.org/apidocs/apidocs-1.1/index.html] unknown field 'host'
6.存储content
在solr的schema.xml中设置
<field name="content" type="text" stored="true" indexed="true"/>
5. 更多细节,请参考:
http://lucene.apache.org/solr/4_9_0/tutorial.html
http://wiki.apache.org/nutch/NutchTutorial#A3.3._Using_the_crawl_script
6. mac上搭建环境经历
1).找到java_home: /usr/libexec/java_home -V
2). 参考nutch文档配置nutch与solr. http://wiki.apache.org/nutch/NutchTutorial
3)启动solr最新版本,我选择的是bin/solr -e dih, 修改schemal也是修改对应example-dih中的schemal.
以下配置问题不行,直到把solr退到3.x,好了.
################################################################
##### ##########
#### ##########
#############################################################
1. 首先安装好java,并配置好环境:
yum update
yum list java*
yum install java-1.7.0-openjdk-devel.x86_64
vi + /etc/profile
JAVA_HOME=/usr/lib/jvm/java JRE_HOME=/usr/lib/jvm/java/jre PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib export JAVA_HOME JRE_HOME PATH CLASSPATH |
2. 然后,下载Solr(4.9),Nutch(1.8),各自解压.
复制 ${NUTCH_RUNTIME_HOME}/conf/schema.xml 到 ${APACHE_SOLR_HOME}/example/solr/conf/
到 ${APACHE_SOLR_HOME}/example 下去启动solr:
java -jar start.jar
3. 到 ${NUTCH_RUNTIME_HOME}/, index 数据到solr:
bin/crawl urls/seed.txt TestCrawl http://localhost:8983/solr/ 2
index之前,配置好抓数据的网址:
4. 问题遇到如下问题,放弃.
=============
====更新此问题20150326,后来看到解决方法:
http://sweblish.iteye.com/blog/1501700
在conf/nutch-default.xml中找到plugin.folders,修改value为绝对路径就好了.
======================
执行index动作的时候,出错:
SOLRIndexWriter
solr.server.url : URL of the SOLR instance (mandatory)
solr.commit.size : buffer size when sending to SOLR (default 1000)
solr.mapping.file : name of the mapping file for fields (default solrindex-mapping.xml)
solr.auth : use authentication (default false)
solr.auth.username : use authentication (default false)
solr.auth : username for authentication
solr.auth.password : password for authentication
Indexer: java.io.IOException: Job failed!
at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1357)
at org.apache.nutch.indexer.IndexingJob.index(IndexingJob.java:114)
at org.apache.nutch.indexer.IndexingJob.run(IndexingJob.java:176)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.nutch.indexer.IndexingJob.main(IndexingJob.java:186)
Solr也出错如下:
114484 [qtp1333371531-18] ERROR org.apache.solr.core.SolrCore ▒C org.apache.solr.common.SolrException: ERROR: [doc=http://nutch.apache.org/apidocs/apidocs-1.1/index.html] unknown field 'host'
6.存储content
在solr的schema.xml中设置
<field name="content" type="text" stored="true" indexed="true"/>
5. 更多细节,请参考:
http://lucene.apache.org/solr/4_9_0/tutorial.html
http://wiki.apache.org/nutch/NutchTutorial#A3.3._Using_the_crawl_script
6. mac上搭建环境经历
1).找到java_home: /usr/libexec/java_home -V
2). 参考nutch文档配置nutch与solr. http://wiki.apache.org/nutch/NutchTutorial
3)启动solr最新版本,我选择的是bin/solr -e dih, 修改schemal也是修改对应example-dih中的schemal.
相关文章推荐
- nutch1.3和solr3.x集成时出现Invalid UTF-8 character问题
- nutch solr 集成问题
- nutch-2.2.1 hbase-0.90.6 solr-4.7.0 集成搭建笔记
- nutch1.3集成solr3.4并支持中文
- 【Nutch2.2.1基础教程之2.1】集成Nutch/Hbase/Solr构建搜索引擎之一:安装及运行【单机环境】
- 集成Nutch和Solr
- Nutch2.1+solr3.6.1+mysql5.6问题
- nutch1.4整合solr3.5,搜索输出xml数据配置问题
- 【Nutch2.2.1基础教程之2.2】集成Nutch/Hbase/Solr构建搜索引擎之二:内容分析
- Nutch1.3集成Solr网页快照功能实现(一)
- 【Nutch2.2.1基础教程之2.1】集成Nutch/Hbase/Solr构建搜索引擎之一:安装及运行【单机环境】 分类: H3_NUTCH H4_SOLR/LUCENCE 2014-07-06 14:46 3543人阅读 评论(2) 收藏
- Nutch 2 + HBase + Solr 4集成
- 集成Nutch和Solr
- 【Nutch2.2.1基础教程之2.2】集成Nutch/Hbase/Solr构建搜索引擎之二:内容分析
- 【Nutch2.2.1基础教程之2.2】集成Nutch/Hbase/Solr构建搜索引擎之二:内容分析
- 【Nutch2.2.1基础教程之2.1】集成Nutch/Hbase/Solr构建搜索引擎之一:安装及运行【单机环境】
- 转载-Nutch和Solr的集成方案
- nutch1.3与solr3.4集成部署在eclipse上之——运行的输出日志
- nutch和solr集成
- 【Nutch2.2.1基础教程之2.1】集成Nutch/Hbase/Solr构建搜索引擎之一:安装及运行【单机环境】