lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephane James Vaucher <vauch...@cirano.qc.ca>
Subject Re: The First Parameter of the IndexWriter
Date Wed, 11 Feb 2004 01:40:34 GMT
You should probably take a look at the javadoc:
http://jakarta.apache.org/lucene/docs/api/index.html

As for where to store the index, you'll want to put it somewhere where all
potential users can access it, as well as where there is enough space for
your index. In a nutshell, you need to think of:
- amount of storage required
- permissions (e.g. if you need to access it from a app server with
security restrictions)
- access, on a shared HD or not
- deployment, if for a product, then it should be included in your
installation strategy, so you might use c:/Program Files/.../MyApp/index,
or /usr/local/MyApp/index.

On win, I personnally use my D drive in a path corresponding
to d:/<app-name>/index.

HTH,
sv

On Tue, 10 Feb 2004, Caroline Jen wrote:

> 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
> http://www.onjava.com/pub/a/onjava/2003/01/15/lucene.html
>
> 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
>        ("java.io.tmpdir", "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 "java.io.tmpdir"?  I sort of doubt it.
>  Please advise.
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Finance: Get your refund fast by filing online.
> http://taxes.yahoo.com/filing.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message