Solr nutch无法成功解析内容

Solr nutch无法成功解析内容,solr,web-crawler,nutch,Solr,Web Crawler,Nutch,我尝试使用nutch 1.4进行爬网,但在解析时遇到错误,这是日志文件: 2012-01-09 09:12:02,696 INFO parse.ParseSegment - ParseSegment: starting at 2012-01-09 09:12:02 2012-01-09 09:12:02,697 INFO parse.ParseSegment - ParseSegment: segment: crawl/segments/20120109091153 20

我尝试使用nutch 1.4进行爬网,但在解析时遇到错误,这是日志文件:

2012-01-09 09:12:02,696 INFO  parse.ParseSegment - ParseSegment: starting at          2012-01-09 09:12:02 
2012-01-09 09:12:02,697 INFO  parse.ParseSegment - ParseSegment: segment: crawl/segments/20120109091153
2012-01-09 09:12:03,416 WARN  parse.ParseUtil - Unable to successfully parse content http://sujitpal.blogspot.com/ of type application/xhtml+xml
2012-01-09 09:12:03,417 INFO  parse.ParseSegment - Parsing: http:// sujitpal.blogspot.com/
2012-01-09 09:12:03,418 WARN  parse.ParseSegment - Error parsing: http://sujitpal.blogspot.com/: failed(2,200): org.apache.nutch.parse.ParseException: Unable to successfully parse content
2012-01-09 09:12:03,419 INFO  crawl.SignatureFactory - Using Signature impl: org.apache.nutch.crawl.MD5Signature
通过检查config/nutch-site.xml,我发现plugin.includes.preperty中包含了html | text | xhtml | xml

<property>
<name>plugin.includes</name>
<value>myplugins|protocol-httpclient|query-(basic|site|url)|summary- 
basic|urlfilter-    
regex|parse-(xml|xhtml|html|tika|text|js)|index-(basic|anchor)|scoring-  
opic|urlnormalizer-(pass|regex|basic)|query-(basic|site|url)|response-(json|xml)
</value>
<description>Regular expression naming plugin directory names to
include.  Any plugin not matching this expression is excluded.
In any case you need at least include the nutch-extensionpoints plugin. By
default Nutch includes crawling just HTML and plain text via HTTP,
and basic indexing and search plugins. In order to use HTTPS please enable 
protocol-httpclient, but be aware of possible intermittent problems with the 
underlying commons-httpclient library.
</description>
</property>

plugin.includes
myplugins |协议httpclient |查询-(基本|站点| url)|摘要-
基本| urlfilter-
regex | parse-(xml | xhtml | tika | text | js)| index-(basic | anchor)|评分-
opic | urlnormalizer-(pass | regex | basic)| query-(basic | site | url)| response-(json | xml)
正则表达式将插件目录名命名为
包括。任何与此表达式不匹配的插件都将被排除。
在任何情况下,您至少需要包含nutch extensionpoints插件。通过
默认Nutch只包括通过HTTP抓取HTML和纯文本,
以及基本的索引和搜索插件。要使用HTTPS,请启用
协议httpclient,但请注意
底层commons httpclient库。

为什么它不能解析xhtml/xml甚至text/xml?

您配置了哪些插件?如果您使用的是tika,那么tika具有从mime类型(如xhtml/xml)到解析器的映射。如果configfile中没有条目,则不会发生任何事情

您可以禁用tika,只使用parse html插件

我用默认的插件配置测试了你的网站

protocol-http|urlfilter-regex|parse-(html)|index-(basic|anchor)
|query-    (basic|site|url)|response-(json|xml)
|summary-basic|scoring-opic|urlnormalizer-     
(pass|regex|basic)
并对你的页面进行了分析

Parsed (32ms):http://sujitpal.blogspot.com/
格雷廷斯 JPee