On Jan 13, 2010, at 5:08 PM, Artem Chereisky wrote: > Hi, > > according to the documentation, IndexSearcher is thread and process safe so > it's ok to use the same searcher in a multi-threaded application (in my case > it's a windows service executing multiple requests at the same time). But, > what are the pros and cons for re-using the searcher? What do you guys > usually do in your apps and why?
It should be reused. Well, the underlying IndexReader is the thing that matters for reuse. Creating a searcher is pretty lightweight given a IndexReader. Opening an IndexReader can be fairly expensive. -Grant
