lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Caroline Jen <>
Subject The First Parameter of the IndexWriter
Date Wed, 11 Feb 2004 00:48:41 GMT
I am constructing a web site.  I am learning the
Lucene so that I can use it to search the database.  I
started with reading the "Introdution In Text Indexing
with Jakarta Apache Lucene" at
and in the example given, it looks that I have to
specify a directory for the first parameter of the
IndexWriter (see below).

   String indexDir = System.getProperty
       ("", "tmp") + System.getProperty
       ("file.separator") + "index-1";

   Analyzer analyzer = new StandardAnalyzer();
   boolean createFlag = true;

   IndexWriter writer = new IndexWriter(indexDir, 
                                analyzer, createFlag);

I have a record created and stored in a table in my
database whenever a user submits his/her inputs.  And
I want to index that record.  What should be the
indexDir in my case?  Should I follow the above
example and use ""?  I sort of doubt it.
 Please advise.

Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message