前回の続き。
今回は前回取得したデータを、GUIから検索してみる。
Hyper Estraierには、検索のプログラムも用意されているので、今回はそれを利用してみた。
1. cgiの設定
まだ設定していなければ設定する。今回はバーチャルホスト内で利用するため、以下のようにした。
<VirtualHost *:80> ServerName path.to.servername VirtualDocumentRoot /home/vh/path.to.servername/htdocs VirtualScriptAlias /home/vh/path.to.servername/cgi-bin </VirtualHost>
そして再起動
$ sudo /etc/init.d/httpd restart
2. 必要ファイルをコピー
/usr/local/share/hyperestraier/locale/ja/以下にある必要ファイルを、今回作成したcgi-bin以下に設置する。
$ sudo cp -r /usr/local/share/hyperestraier/locale/ja/ /home/vh/path.to.servername/cgi-bin $ sudo cp /usr/local/libexec/estseek.cgi /home/vh/path.to.servername/cgi-bin $ sudo chmod 755 /home/vh/path.to.servername/cgi-bin
3. estseek.confファイルの設定
・ファイルをコピーしただけだと動かないので、設定ファイルを修正する。
indexnameに自分が作成したインデックスのパスを指定。
indexname: casket
↓
indexname: /path/to/index/_index
・ドキュメントルートを指定
replace: ^file:///home/mikio/public_html/{{!}}http://localhost/
↓
replace: ^file:///path/to/document_root/{{!}}http://localhost/
これで設定完了。http://path.to.servername/cgi-bin/estseek.cgiにアクセスしてみる。
いけた。
ためしに検索してみる。
いけた。