Jakarta Lucene

About

Resources

Download

Jakarta

About this Document
このドキュメントについて

This document is intended as a "getting started" guide to using and running the Jakarta Lucene demos. It walks you through some basic installation and configuration.

このドキュメントは、"スタートアップ" ガイドとして書かれていて、 Jakarta Luceneのデモを動かしてみます。 基本的なインストールと設定を説明します。


About the Demos
デモについて

The Lucene Demo code is a set of command line example applications that demonstrate various functionality of Lucene and how one should go about adding it to their applications.

Luceneのデモコードは、コマンドラインの例題アプリケーションになっていて、 Luceneの様々な機能やアプリケーションに追加する方法などをデモンストレーションしています。


Setting your classpath
クラスパスを設定する

First, extract the latest Lucene distribution.

まずはじめに、Lucene の最新ディストリビューションを展開します。

You should see the Jakarta Lucene jar file in the directory you created when you extracted the archive. It should be named something like lucene-{version}.jar.

アーカイブを展開したときに作られたディレクトリの中に、 Jakarta Luceneのjarファイルがあります。 lucene-{バージョン}.jarというような名前がついているはずです。

You should also see a file called called lucene-demos-{version}.jar. Put both of these files in your Java CLASSPATH.

lucene-demos-{バージョン}.jarという名前がついたファイルもあるはずです。 この両方のファイルをJavaのクラスパスに追加します。


Indexing Files
ファイルのインデックスを作成する

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個ごとにまとめて表示され、次の結果を見るかどうか聞いてきます。


About the code...
コードについて...

read on>>>

つづく>>>



Copyright © 1999-2002, Apache Software Foundation