レコード・ストアに書き出すサンプルWebクロールの実行

このトピックでは、ディスク上のファイルではなくレコード・ストア・インスタンスに出力を書き出すサンプルWebクロールを実行します。このサンプルは<install path>\IAS\<version>\sample\webcrawler-to-recordstoreに格納されています。run-sampleスクリプトを実行することによって、サンプルのWeb Crawlerが実行されます。

このディレクトリには、idPropertyNameの値に基づいて一意のレコードIDを生成するようにレコード・ストアを構成するrecordstore-configuration.xmlファイルも含まれます。

<install path>\IAS\<version>\sample\webcrawler-to-recordstore\confディレクトリにあるsite.xmlファイルには、レコード・ストアの情報を指定するための次の出力プロパティがあります。
<property>
	<name>output.recordStore.host</name>
	<value>localhost</value>
	<description>
	The host of the record store service.
	Default: localhost
	</description>
</property>

<property>
	<name>output.recordStore.port</name>
	<value>8401</value>
	<description>
	The port of the record store service.
	Default: 8401
	</description>
</property>

<property>
	<name>output.recordStore.contextPath</name>
	<value></value>
	<description>
	The context path of the record store service. If the property is not set, the value is empty (i.e. the root context path).
	</description>
</property>

<property>
	<name>output.recordStore.instanceName</name>
	<value>rs-web</value>
	<description>
	The name of the record store service.
	Default: rs-web
	</description>
</property>
Endeca IAS Serviceを実行するホストに合わせて、ホストとポートの値を変更してください。Endeca Web CrawlerをWebLogic Serverで実行している場合は、output.recordStore.contextPath設定が正しいことを確認してください。Endeca Web CrawlerをJettyで実行している場合は、output.recordStore.contextPathを空のままにします。

サンプルWebクロールを実行するには:

  1. コマンド・プロンプト・ウィンドウを開きます。
  2. <install path>\IAS\<version>\sample\webcrawler-to-recordstoreディレクトリに移動します。
  3. run-sampleスクリプトを実行します。
Web Crawlerの実行が完了すると、ディスク上のファイルではなく、レコード・ストアに出力が書き出されます。IAS\workspace\ias-service.logを参照すると、次のようなメッセージが出力されていることを確認できます。
Starting new transaction with generation Id 1
Started transaction 1 of type READ_WRITE
Marking generation committed: 1
Committed transaction 1

この例では、レコード・ストアはIDに1を使用してレコードを生成し、格納しています。