Nutch&Solr小計

新開一篇專門記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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章