Changes between Version 6 and Version 7 of waue/2011/10


Ignore:
Timestamp:
Oct 12, 2011, 6:10:51 PM (13 years ago)
Author:
waue
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • waue/2011/10

    v6 v7  
    3434 * 思考 user 將 idb 打包出來之後,最方便的匯入自己系統的方式。
    3535   * 如:一個 a.war 中有 搜尋頁面與索引庫,則使用者只需將此war 放到他自己的tomcat 就能使用。
     36   * 然而 /opt/crawlzilla/tomcat/webapp/xxx/WEB-INF/classes/nutch-site.xml 中的searher.dir 之 value 為系統絕對路徑,而非 該網頁的相對路徑,造成idb定位困擾
     37   * 若要解決以上問題,需改寫 nutch-1.2/src 內的 ./java/org/apache/nutch/searcher/DistributedSegmentBean.java
     38{{{
     39#!java
     40...@91 line...
     41  public NutchBean(Configuration conf, Path dir) throws IOException {
     42    this.conf = conf;
     43    this.fs = FileSystem.get(this.conf);
     44    if (dir == null) {
     45      dir = new Path(this.conf.get("searcher.dir", "crawl"));
     46    }
     47....
     48}}}