Quote:
I also hope someone can tell me how hibernate search cache IndexSearcher.
Internally it uses the configured ReaderProvider implementation, the default one is the most efficient reopen() of the index, so it will check for the need of reopening a new one. You can configure another implementation from the provided set, or write your own one. But in any case in your code if you know you won't need a new one you can keep the reference to the IndexReader for a long time.
On FullTextSession there's a method to getSearchFactory() and this exposes both getReaderProvider() and getDirectoryProviders(Class<?> entity),
you can get the DirectoryProvider for a specific type from the latter and then use the first to get an IndexReader - this is in case you're not using HS search api, as it uses them behind the scenes without need to worry.