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.

Thanks,

Rob


-----Original Message-----
From: Otis Gospodnetic [mailto:[EMAIL PROTECTED]
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.

Otis


--- Rob Outar <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to