is IndexSearcher.doc(int) method thread safe?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Siraj_Haider
Posted On:   Wednesday, August 23, 2006 12:26 PM

My code looks like :


TopFieldDocs tfd = indexSearcher.search(query, filter, records, sort);


for (int i=0; i

Document doc = indexSearcher.doc(tfd.scoreDocs[i].doc);

}



Now the problem is, there is only one instance of indexSearcher in application and many threads are using the same instance to search the index. Now if two different searches have the results and both are calling indexSearcher.doc(int) method to get the document, will it be thread-safe?


thanks


Siraj

About | Sitemap | Contact