dcsimg
Is the IndexReader thread safe? Can we keep it open and shared by all the concurrent search sessions? In that case when do I need to close the reader?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Thursday, February 27, 2003 05:53 PM

We have encounter a problem of "too many files open" several times in the past when there are a lot of concurrent users. It seems like IndexReader will keep all the files open for a segment. And the fact that we dish out new instance of IndexReader for each concurrent search session will flood the system with a lot of open files. What is the best strategy of using IndexReader? Keeping one open all the time and share by all the search sessions? Is there any concern of doing that, like performance? When do I need to close this shared reader? What happen when I have a reader open and another reader removing documents, or an IndexWriter updating index files? Will t   More>>


We have encounter a problem of "too many files open" several times in the past when there are a lot of concurrent users. It seems like IndexReader will keep all the files open for a segment. And the fact that we dish out new instance of IndexReader for each concurrent search session will flood the system with a lot of open files.





What is the best strategy of using IndexReader? Keeping one open all the time and share by all the search sessions? Is there any concern of doing that, like performance?





When do I need to close this shared reader?



What happen when I have a reader open and another reader removing documents, or an IndexWriter updating index files? Will the open reader miss the new update?

   <<Less

Re: Is the IndexReader thread safe?

Posted By:   Otis_Gospodnetic  
Posted On:   Saturday, March 1, 2003 08:41 AM

All of your questions have already been answered in Lucene's jGuru FAQ.
About | Sitemap | Contact