: There is a lot of caching data in each index searcher. For large : index, it's definitely a waste to re-create index searcher every time.
this is particularly true when you do sorts on specific fields, anytime you sort on a field, your searcher/reader loads a FieldCache for that field which contains an array for every doc in your index and the value of that field. In teh sample code posted, you are doing a tertiary sort -- which means every search requires loading three of these arrays, all of which appear to be on String fields. that's a lot of IO to get that data, and a lot of memory to hold those arrays just to do one search and then throw it away. If you use one searcher for many searches, you only have to pay that time/memory cost once. -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]