You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Rob Outar <ro...@ideorlando.org> on 2003/04/30 17:30:28 UTC
When is a good time to call optimize()
The product we are working on allows folks to add files to the index, remove
files from the index, add/remove fields from/to documents in the index, etc.
so the index changes quite a bit. I was calling optimize after someone
added a file or removed a file but performance was poor. After how many
changes should I call optimize? I have noticed since I stopped calling
optimize I have TONS of files in my index folder... So I need to perodically
call optimize to cut down on the number of files... So I am curious what
other folks are doing. So if anyone has an opinion/solution I would like to
hear it.
Thanks,
Rob
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org
Re: When is a good time to call optimize()
Posted by David Medinets <me...@mtolive.com>.
Does the application have a period of least activity? Perhaps at 5:30am or
on a weekend? If so, that might be a good time.
----- Original Message -----
From: "Rob Outar" <ro...@ideorlando.org>
> So if anyone has an opinion/solution I would like to
> hear it.
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org
Re: When is a good time to call optimize()
Posted by Leo Galambos <Le...@seznam.cz>.
It is evergreen of this list, I guess :-).
Nobody can tell you IMHO. You would execute it, when your app is in
"idle" state and you have changed the index significantly.
I've already implemented an algorithm that does not need any optimize(),
because the index is optimized automatically (moreover it uses less file
handles - it is important when your app is under DoS time to time).
Unfortunately, this solution was implemented in another OSS JAVA search
engine, and it does not run with Lucene architecture AFAIK. I'm sorry.
-g-
Rob Outar wrote:
>The product we are working on allows folks to add files to the index, remove
>files from the index, add/remove fields from/to documents in the index, etc.
>so the index changes quite a bit. I was calling optimize after someone
>added a file or removed a file but performance was poor. After how many
>changes should I call optimize? I have noticed since I stopped calling
>optimize I have TONS of files in my index folder... So I need to perodically
>call optimize to cut down on the number of files... So I am curious what
>other folks are doing. So if anyone has an opinion/solution I would like to
>hear it.
>
>Thanks,
>
>Rob
>
>
>---------------------------------------------------------------------
>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