2017-12-21 33 views
0

私は同じ問題があります。Nutchx2のラウンド数の使い方

crawl urls/ucuzcumSeed.txt ucuzcum http://localhost:8983/solr/ucuzcum/ 10 

crawl <seedDir> <crawlID> [<solrUrl>] <numberOfRounds> 

私は2.3.1バージョンのNutchと5.2.1バージョンのSolrを使用しています。問題は、このコマンドだけではウェブサイト全体を取得できないということです。私はnumberofRoundsパラメータdoesnt動作すると思います。最初にnutchを実行すると、1つのURLがフェッチされ、生成されて解析されます。 2番目のステップでは、より多くのURLを取得することができます。この場合、これは最初の反復の終わりにnutchの停止を意味します。しかしそれは私の命令に従って続けるべきです。 nutchでウェブサイト全体をクロールするにはどうすればよいですか?

Nutchの-site.xmlを:

<property> 
     <name>http.agent.name</name> 
     <value>MerveCrawler</value> 
    </property> 

<property> 
     <name>storage.data.store.class</name> 
     <value>org.apache.gora.hbase.store.HBaseStore</value> 
     <description>Default class for storing data</description> 
    </property> 

<property> 
     <name>plugin.includes</name> 
     <value>protocol-httpclient|urlfilter-regex|index-(basic|more)|query-(basic|site|url|lang)|indexer-solr|nutch-extensionpoints|protocol-httpclient|urlfilter-rege$ 
    </property> 

<property> 
    <name>http.content.limit</name> 
    <value>-1</value><!-- No limit --> 
    <description>The length limit for downloaded content using the http:// 
     protocol, in bytes. If this value is nonnegative (>=0), content longer 
     than it will be truncated; otherwise, no truncation at all. Do not 
     confuse this setting with the file.content.limit setting. 
    </description> 
    </property> 
<property> 
    <name>fetcher.verbose</name> 
    <value>true</value> 
    <description>If true, fetcher will log more verbosely.</description> 
</property> 

<property> 
    <name>db.max.outlinks.per.page</name> 
    <value>100000000000000000000000000000000000000000000</value> 
    <description>The maximum number of outlinks that we'll process for a page. 
    If this value is nonnegative (>=0), at most db.max.outlinks.per.page outlinks 
    will be processed for a page; otherwise, all outlinks will be processed. 
    </description> 
</property> 

<property> 
    <name>db.ignore.external.links</name> 
    <value>false</value> 
    <description>If true, outlinks leading from a page to external hosts 
    will be ignored. This is an effective way to limit the crawl to include 
    only initially injected hosts, without creating complex URLFilters. 
    </description> 
</property> 
<property> 
    <name>db.ignore.internal.links</name> 
    <value>false</value> 
    <description>If true, when adding new links to a page, links from 
    the same host are ignored. This is an effective way to limit the 
    size of the link database, keeping only the highest quality 
    links. 
    </description> 
</property> 

<property> 
    <name>fetcher.server.delay</name> 
    <value>10</value> 
    <description>The number of seconds the fetcher will delay between 
    successive requests to the same server. Note that this might get 
    overriden by a Crawl-Delay from a robots.txt and is used ONLY if 
    fetcher.threads.per.queue is set to 1. 
    </description> 
</property> 
<property> 
    <name>file.content.limit</name> 
    <value>-1</value> 
    <description>The length limit for downloaded content using the file 
    protocol, in bytes. If this value is nonnegative (>=0), content longer 
    than it will be truncated; otherwise, no truncation at all. Do not 
    confuse this setting with the http.content.limit setting. 
    </description> 
</property> 

<property> 
    <name>http.timeout</name> 
    <value>100000000000000000000000000000000000</value> 
    <description>The default network timeout, in milliseconds.</description> 
</property> 
<property> 
    <name>http.timeout</name> 
    <value>100000000000000000000000000000000000</value> 
    <description>The default network timeout, in milliseconds.</description> 
</property> 

<property> 
    <name>generate.max.count</name> 
    <value>100000000</value> 
    <description>The maximum number of urls in a single 
    fetchlist. -1 if unlimited. The urls are counted according 
    to the value of the parameter generator.count.mode. 
    </description> 
</property> 

答えて

0

クロールはさらに、例えば得られない可能性がありますいくつかの理由がありますrobots.txtディレクティブログやクロールテーブルの内容を調べて、問題の詳細を確認してください。

+0

特定のWebサイトにrobots.txtがあるかどうかを確認しました。しかし私はどんな制限も見つけません。私はウェブサイト全体をクロールできない他の理由は何でしょうか? – mrvsta