Once you've gotten this far you're probably itching to go. Let's build an index!
Assuming you've set your classpath correctly, just type
"java org.apache.lucene.demo.IndexFiles {full-path-to-lucene}/src". This will produce
a subdirectory called "index" which will contain an index of all of the Lucene
sourcecode.
ここまで来たらうずうずしてきたことでしょう。
さあ、インデックスを作成しましょう!
きちんとクラスパスを設定していれば、
"java org.apache.lucene.demo.IndexFiles {Luceneのフルパス}/src" と打つだけです。
すると、"index"という名前のサブディレクトリを作成して、
Luceneのソースコードすべてのインデックスを入れていきます。
To search the index type "java org.apache.lucene.demo.SearchFiles". You'll be prompted
for a query. Type in a swear word and press the enter key. You'll see that the Lucene
developers are very well mannered and get no results. Now try entering the word "vector".
That should return a whole bunch of documents. The results will page at every tenth
result and ask you whether you want more results.
インデックスを検索するには "java org.apache.lucene.demo.SearchFiles"と打ちます。
すると、クエリーを入力するためのプロンプトが現れます。
何か悪口を入力して、enterキーを押しましょう。
Luceneの開発者は行儀がよい、ということがわかると思いますが、なんの結果も得られません。
次に、"vector"という単語を入力してみましょう。全ドキュメントが返ってくるはずです。
結果は10個ごとにまとめて表示され、次の結果を見るかどうか聞いてきます。