18 sep 2007 kl. 07.12 skrev Shailendra Mudgal:
What my goal is to understand the caching strategy. How well this work for repetitive queries. Is there any room available to improve this.
It is usually a loss of resources to cache results in a busy system with gaussianity distributed queries. There is a paragraph on the wiki <http://wiki.apache.org/lucene-java/LuceneCaveats> that explains this: Lucene is amazingly fast at searching. Rather than caching hits and paging through them, merely re-executing the query is often fast enough.
I have conducted experiements with active results cache at index update time, soft/weak references and some other things I can't think of right now. Most of the time it ended up with the garbage collector going crazy with zillions of tiny soft/weak referenced instances, clock ticks spent updating results people don't that much, et c. You really need a lot of repetative queries in order for such a cache to do any good.
If you are retrieving a lot of stored fields it might make sense to cache documents that are frequently accessed.
-- karl --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]