lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shah, Vineel" <vin...@hotjobs.com>
Subject RE: Index Reader and Writer
Date Tue, 22 Apr 2003 16:34:17 GMT
I don't think that's a good idea -- Searches against your index don't have access to the newly
added documents until after you close the IndexWriter. (I think... anybody want to confirm?)

If you're having performance problems, cut down on the optimizing. I've found the optimizing
is very slow and very ram intensive. What I do is have 2 copies of the index, 1 on disk and
1 in ram. I incrementally update both of them, but I only optimize the disk-based index. Every
30 minutes, I
refresh the RAM-based index from disk. This takes a few seconds with a 250,000 rec index weighing
in at about 200mb.

Also, searches in RAM happen 15x faster than searches on disk indexes, at least in my load
tests.

hope this helps,

vineel

-----Original Message-----
From: mganesh [mailto:mganesh@newgen.co.in]
Sent: Friday, April 18, 2003 2:00 AM
To: Lucene Users List
Subject: Index Reader and Writer


Hello all,
   My project is socket based application.Whenever I receive a request, i have to index the
document send by the client using
   lucene.

  Algorithm 
   1.create Index reader object
   2.delete the document if it is already indexed.
   3. close the  Index reader 
   4. create Index writer object
   5. Add a document to writer object
   6. Optimise the index
   7.close the writer object

 I have to index around 1 lakh (100,000) document.
 Here Im creating Reader and Writer object for every request.

 Whether If I create only one Reader and Writer Object and make it as static then the performance
will increase??
 Whether the Index reader and writer object has any influence with the performance??  

regards
ganesh



  

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message