lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ganesh - yahoo" <>
Subject when to refresh IndexSearcher and IndexWriter
Date Thu, 28 Aug 2008 10:35:50 GMT
Hello all,

My index will get update very frequently.

1) When shall i need to optimize IndexWriter? I have planned to optimize 
every day. Is that fine.

2) When shall i need to re-open IndexReader and IndexSearcher? I have 
planned to do it every 10 minutes.

3) IndexSearcher could be used across threads. If i have to re-open the 
IndexReader and IndexSearcher, then it should be synchronized. If i try to 
do this then i am ending up in doing complete search functionality in 
synchronization. Is there any better way to do that.

synchronized void search() {

if 10 mins is elapsed reopen the reader else use the original..

collect the hits
Is there any better way to do it.


Send instant messages to your online friends 

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

View raw message