lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dan2000 <liu...@ntlworld.com>
Subject Re: modify existing non-indexed field
Date Sat, 08 Jul 2006 08:26:21 GMT

Thanks a lot Doron. 

I thought I had to close all readers and searchers in order to new
IndexWriter, otherwise I keep getting Lock timeout exception in a
multithreaded environment. In my case, modifying/adding/deleting only
happens occasionally, so I don't have a IndexWritter that is open all the
time. In order to avoid lock timeout exception, I had to put a real lock in
my search method, and a write lock in my add/modify method. I know this is
not efficient enough since all the readers/searcher are re-opened each time
adding/modifing happens.

>From what you said, I'm thinking of switching to IndexModifier. Before that,
I have a few more questions:
1. without using an exclusive lock, is there anyway to new a IndexModifier
or IndexWritter while IndexReaders are serving search queries? or do I have
to new a IndexWriiter when system starts and keep it open all the time?
2. When adding a new document, and calling optimize(), do I have to close
the readers/searchers?
3. In my case, updating non-idexed fields happens a lot, can you explain the
side data store in more detail? I'm not sure with this approch. Do you mean
creating a seperate database and stores lucene's ids?

-- 
View this message in context: http://www.nabble.com/modify-existing-non-indexed-field-tf1905726.html#a5229084
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


Mime
View raw message