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 neils <ne...@gmx.net> on 2006/08/26 08:59:01 UTC

Incemental Updating

Hi,

i have two applications on an windows machine. One is the searchengine where
the index is can be searched.
The second application runs one time on a day which updates
(deletions/adding)
the index.

My question:
The index is already opened (Indexreader) by the frist application. Is there
a problem when second application accesses the same indexfiles for updating 
at the same time? I tried it and i get no exception, but when i search for
the for documents where the values where changed (first delete, than add 
new document), i can only find it with the old values, not with new ones.


Thanks a lot for you help :-))

-- 
View this message in context: http://www.nabble.com/Incemental-Updating-tf2168389.html#a5995363
Sent from the Lucene - Java Users forum at Nabble.com.


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


Re: Incemental Updating

Posted by Doron Cohen <DO...@il.ibm.com>.
> i have two applications on an windows machine. One is the searchengine
where
> the index is can be searched.
> The second application runs one time on a day which updates
> (deletions/adding)
> the index.
>
> My question:
> The index is already opened (Indexreader) by the frist application. Is
there
> a problem when second application accesses the same indexfiles for
updating
> at the same time?

No problem at all - you can update an index while it is used for search.

> I tried it and i get no exception, but when i search for
> the for documents where the values where changed (first delete, than add
> new document), i can only find it with the old values, not with new ones.

Once the update is done, you need to close the searcher and open a new one.
A searcher, once open, will not reflect further updates to the index. One
more thing to consider is warming a newly opened searcher before switching
from an "old" searcher to the new one.

Lucene FAQ - http://wiki.apache.org/jakarta-lucene/LuceneFAQ - has a few
relevant items, in particular
http://wiki.apache.org/jakarta-lucene/LuceneFAQ#head-e1cf4d5e35de90d7dd76d9097648a6b720d54cb5
 and
http://wiki.apache.org/jakarta-lucene/LuceneFAQ#head-3558e5121806fb4fce80fc022d889484a9248b71




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