Changes between Initial Version and Version 1 of waue/2011/0311


Ignore:
Timestamp:
Mar 11, 2011, 7:20:45 PM (13 years ago)
Author:
waue
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • waue/2011/0311

    v1 v1  
     1= nutch 1.2 的改變 =
     2
     3與nutch 1.0 有許多差異,lucene 的更新,以及索引自庫的關聯方式都不同,try 出以下可能可以完成的方式:
     4
     5== 前提 ==
     6
     7假設索引自庫已經用 bin/nutch crawl 完 http://www.nchc.org.tw/tw/ 後,下載到local 端,路徑為 ~/kkk 。(因此kkk/ 內有 index, indexes,segments,crawldb,linkdb )
     8
     9tomcat 安裝於 /opt/tomcat/
     10
     11nutch 安裝於 /opt/nutch/
     12
     13假設創立一個 0311test的搜尋頁面,
     14
     15== 步驟 ==
     16
     17{{{
     18/opt/tomcat/bin/catalina.sh stop
     19mkdir /opt/tomcat/webapps/0311test/
     20cp /opt/nutch/nutch-1.2.war /opt/tomcat/webapps/0311test
     21cd /opt/tomcat/webapps/0311test/
     22jar xvf ./nutch-1.2.war
     23rm nutch-1.2.war;
     24cp -rf ~/kkk ./crawl
     25/opt/tomcat/bin/catalina.sh start
     26}}}
     27
     28官方網站 http://wiki.apache.org/nutch/NutchTutorial說,訣竅在於,當我們執行 /opt/tomcat/bin/catalina.sh start 時,本身所在目錄要有 crawl 這個資料夾,nutch 搜尋才會正確對應到索引自庫。
     29
     30Then visit: http://localhost:8080/0311test
     31
     32
     33= !NutchBean 驗證 =
     34
     35官網有提到,用 !NutchBean 驗證索引庫正確性的方法,原文僅提 ([http://wiki.apache.org/nutch/NutchTutorial])
     36
     37{{{
     38#!text
     39Simplest way to verify the integrity of your crawl is to launch NutchBean  from command line:
     40
     41 bin/nutch org.apache.nutch.searcher.NutchBean apache
     42
     43where apache is the search term (note that NutchBean will only search pages in the crawl directory, so if you named the crawl directory something else, NutchBean will not find any results). After you have verified that the above command returns results you can proceed to setting up the web interface.
     44
     45}}}
     46
     47但訣竅在於,執行
     48{{{
     49bin/nutch org.apache.nutch.searcher.NutchBean [搜尋字串] [hdfs上的索引目錄]
     50}}}
     51
     52因此執行這個程式時,hadoop 四個身份需已經啟動,並且要搜尋的索引庫已經放在 hdfs 上,才搜的到東西
     53
     54{{{
     55waue@u1004:/opt/tomcat/webapps/0311test$ /opt/nutch/bin/hadoop dfs -ls
     56
     57Found 14 items
     58drwxr-xr-x   - waue supergroup          0 2010-11-24 19:26 /user/waue/crawlbek
     59drwxr-xr-x   - waue supergroup          0 2010-11-25 09:47 /user/waue/ftp1
     60drwxr-xr-x   - waue supergroup          0 2010-11-26 15:55 /user/waue/t-hfil2
     61drwxr-xr-x   - waue supergroup          0 2010-11-25 18:01 /user/waue/t-hfilter
     62drwxr-xr-x   - waue supergroup          0 2010-11-26 16:13 /user/waue/url
     63
     64waue@u1004:/opt/tomcat/webapps/0311test$ /opt/nutch/bin/nutch org.apache.nutch.searcher.NutchBean nchc crawlbek
     65
     66Total hits: 249
     67 0 20101124184700/http://www.nchc.org.tw/en/
     68 ... Reserved|Resolution 1024 * 768| webmaster@nchc.narl.org.tw Latest Update ... th ~ December 10 th , 2010@ NCHC, Taiwan More   Southeast Asia International ...
     69 1 20101124184929/http://www.nchc.org.tw/en/e_paper/
     70 ... to Cloud Computing Issue 19:NCHC Establishes a Cloud ... HPC Research - The NCHC’s All New GPU Cluster ...
     71 2 20101124184929/http://www.nchc.org.tw/en/about/publication/message/2010_spring.php
     72 ... Collaborative Research Applied Sciences   ::: About NCHC Home  »  About NCHC  »  Publications  »  NCHC Newsletter  » NCHC Newsletter Spring, 2010, Issue NO ...
     73 3 20101124184929/http://www.nchc.org.tw/en/about/
     74 ... Collaborative Research Applied Sciences   ::: About NCHC Home  » About NCHC With Taiwan's most bountiful ... Reserved|Resolution 1024 * 768| webmaster@
     75 4 20101124184929/http://www.nchc.org.tw/en/about/job.php
     76 ... Collaborative Research Applied Sciences   ::: About NCHC Home  »  About NCHC  » Jobs at NCHC If you would like to ...
     77 5 20101124185839/http://www.nchc.org.tw/en/about/publication/message/
     78 ... Collaborative Research Applied Sciences   ::: About NCHC Home  »  About NCHC  »  Publications  » NCHC Newsletter     NCHC Newsletter   2009 Spring   2009Summer     2009 ...
     79 6 20101124184929/http://bioinfo.nchc.org.tw/
     80Bioinformatics Knowledge Database 國網中心生物知識庫與生物計算服務 ...
     81 7 20101124184929/http://ecogrid.nchc.org.tw/
     82 ... were picked as show cases.     NCHC Ecogrid team provided the ... into database in NCHC, consumers can query by a ...
     83 8 20101124184929/http://www.nchc.org.tw/en/research/list.php
     84 ... Director History Publications Jobs at NCHC Driving Directions HPC Services Educational ... Wed, November 24, 2010 ::: About NCHC Areas of Service ...
     85 9 20101124184929/http://accta.nchc.org.tw/en/
     86ACCTA | Login | Home | 中文 |   To protect your account and password security, please click  ...
     87
     88}}}