lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Outar" <>
Subject RE: Indexing Growth
Date Thu, 03 Apr 2003 16:30:16 GMT
I took out the optimize() after the write and the index is growing but at
like a 1kb rate, but now there are tons of 1kb files.  I assume at this
optimize would fix this?  What is a good rule of thumb for calling
optimize()?  Will Lucene ever invoke an optimize() on it's own?


Rob Outar
Software\Data Engineer
321-235-7660 <>

-----Original Message-----
From: Rob Outar []
Sent: Thursday, April 03, 2003 10:53 AM
To: Lucene Users List
Subject: RE: Indexing Growth

Would there be any abnormal effects if after adding a document, you called
optimize?  I am still seeing a large growth from "setting" a field.  When I
set a field I:

1.  Get the document
2.  Remove the field.
3.  Write the document to index
4.  Get the document again.
5.  Add the new field object.
6.  Write the document to index.
7.  Call optimize.

>>From writing out my steps it looks like I should write a set method instead
of treating set as removeField() and addField(), I thought combining these
two would equal set which it does, but it seems horribly inefficient.  But
in any case would the above cause in the index to grow from say 10.5 megs to
31 megs?

Is there any efficient way to implement a set, for example if there was a
field value pair of book/hamlet, but now we wanted to set book = none?
Please keep in mind there could be multiple field names with book.  So it is
not simply a matter of removing the field book and then readding it.

Anyhow let me know your thoughts.



-----Original Message-----
From: Otis Gospodnetic []
Sent: Wednesday, April 02, 2003 11:35 AM
To: Lucene Users List
Subject: RE: Indexing Growth

Funny how this is the outcome of 90% of the problems people have with
software - their own mistakes :)

Regarding reindexing - no need for any explicit calls.  When you add a
document to the index it is indexed right away.  You will have to
detect index change (methods for that are there) and re-open the
IndexSearcher in order to see newly added/indexed documents.


--- Rob Outar <> wrote:
> I found the freakin problem, I am going to kill my co-worker when he
> gets
> in.  He was removing a field and adding the same field back for each
> document in the index in a piece of code I did not notice until
> now!!!!!!!!!!!!!!!!  He is so dead.  I commented out that piece of
> code,
> queried to my hearts content and the index has not changed.  Heck the
> tool
> is like super fast now.
> One last concern is about the re-indexing thing, when does that
> occur?
> optimize()?  I am curious what method would cause a reindex.
> I want to thank all of you for your help, it was truly appreciated!
> Thanks,
> Rob
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more

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

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

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

View raw message