土曜日, 2月 10, 2007

[search] Solrお試し

SolrチュートリアルをWindowsでやってみた.

ドキュメント登録はhttpでPOSTしなくてはならないらしい(post.shより)ので,cURLのWindows版を取ってきて以下のようにした.


d:\Solr\curl\curl.exe --data-binary @hd.xml -H "Content-type:text/xml; charset=utf-8" http://localhost:8983/solr/update
~snip~
d:\Solr\curl\curl.exe --data-binary @vidcard.xml -H "Content-type:text/xml; charset=utf-8" http://localhost:8983/solr/update
d:\Solr\curl\curl.exe --data-binary "<commit/>" -H "Content-type:text/xml; charset=utf-8" http://localhost:8983/solr/update

d:\Solr\curl\curl.exe --data-binary "<delete><id>3007WFP</id></delete>" -H "Content-type:text/xml; charset=utf-8" http://localhost:8983/solr/update

いちおう検索は出来ている様子.これに日本語を通さないとね.

追伸:
 韓国ではLuceneがブームなんですね.

追伸2:
 ちなみにcurlでproxyを使うときは"-x localhost:8080"みたいなオプションで。

0 件のコメント: