Nutch&Solr小计

本文介绍Nutch与Solr的不同版本及其环境搭建过程,包括Hadoop、HBase等组件的搭配使用。此外,还详细探讨了几种常用的中文分词插件,如jcseg、IKAnalyzer、mmseg4j和ansj等,并提供了插件安装方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

新开一篇专门记Nutch&Solr。

版本

Nutch版本

Nutch目前是两条线路开发,所以2.x并不比1.x来的高,来的新。
  1. 1.x(目前,最新1.8,默认搭配hadoop1.2,可以搭配hadoop2.2。)
  2. 2.x(目前,最新2.2.1,默认搭配hadoop1.2,并且不可以搭配hadoop2.2,因为,gora0.3可以使用hbase0.90.x和0.92.x,但此版本的hbase不能用hadoop2.2,而hadoop1.2是可以的。)

Solr版本

  1. 4.7

环境搭建

Nutch搭建

  1. 1.x(目前,最新1.8.)
  2. 2.x(目前,最新2.2.1)

Solr搭建

Solr本身

  1. 4.7

中文分词

分词插件
  1. jcseg
    • jcseg是使用Java开发的一个中文分词器,使用流行的mmseg算法实现。
    • 目前最高版本:jcseg 1.9.3。兼容最高版本lucene-4.x和最高版本solr-4.x
    • mmseg四种过滤算法,分词准确率达到了98.41%。
  2. IK Analyzer
    • 采用了特有的“正向迭代最细粒度切分算法“,支持细粒度和智能分词两种切分模式; 
    • 最新版本2012年10月
  3. mmseg4j
    • mmseg4j 用 Chih-Hao Tsai 的 MMSeg 算法(http://technology.chtsai.org/mmseg/ )实现的中文分词器,并实现 lucene 的 analyzer 和 solr 的TokenizerFactory 以方便在Lucene和Solr中使用。
    • MMSeg 算法有两种分词方法:Simple和Complex,都是基于正向最大匹配。Complex 加了四个规则过虑。官方说:词语的正确识别率达到了 98.41%。mmseg4j 已经实现了这两种分词算法。 
    • 最新版本2013-07-13版本1.9.1兼容 solr 4.3.1
  4. ansj
    • ansj分词.ict的真正java实现.分词效果速度都超过开源版的ict. 中文分词,人名识别,词性标注,用户自定义词典
    • 正在积极开发中
  5. d
插件安装
  1. smartcn & IK

Python&Solr

官方介绍

  1. 纯HTTP,官方说明
  2. mysolr
    mysolr was born to be a fast and easy-to-use client for Apache Solr’s API and because existing Python clients didn’t fulfill these conditions.Since version 0.5 mysolr supports Python 3 except concurrent search feature.
  3. pysolr (比较简单的API,目前,我使用的就是这个。)
    pysolr is a lightweight Python wrapper for Apache Solr. It provides an interface that queries the server and returns results based on the query.
  4. Haystack(比较复杂)
    Haystack provides modular search for Django. It features a unified, familiar API that allows you to plug in different search backends (such as Solr, Elasticsearch, Whoosh, Xapian, etc.) without having to modify your code.
  5. insol (看着不错但是对其支持的Solr版本比较怀疑,官方称兼容1.4)
    • REPL friendly shortcuts module to start working right away
    • Solr queries as Python objects, so that others can use your code abstracted away from inner workings of Solr - this is a design similar to Django ORM with it's Q and F objects
    • fast and cache friendly - results as simple dicts, no builtin dict to object inflation code - either use the results as-is or provide your own inflation mechanism
      configuration module with live config reload to support connecting to multiple Solr instances or cores at run time
    • flexible structure allowing you to customize the whole process of connecting to Solr instance and fetching documents without rewriting whole API
  6. sunburnt
    It's tested with Solr 1.4.1 and 3.1; previous versions were known to work with 1.3 and 1.4 as well.
  7. solrpy

资料

源码分析

  1. Nutch1.7源码分析

书籍

  1. Solr in action 讲的版本是Solr4.7(目前最新)
  2. Solr官方推荐书籍
  3. Web Crawling and Data Mining with Apache Nutch

论文

  1. Building Nutch: Open Source Search

其他

  1. 《Nutch公开课从搜索引擎到网络爬虫》百度文库
  2. Nutch二次开发
  3. Nutch1.7二次开发培训讲义 之 腾讯微博抓取分析
  4. http://wiki.apache.org/nutch/HttpAuthenticationSchemes
  5. Nutch Command line Option
  6. SolrCloud
  7. Dump Lucene Index
  8. nutch-mongodb-indexer
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值