Cheers,
In my scenario. I've made sure that the index does not get modified
(so reopen shouldnt be necessary ?).
I've tried scenario with both caching and not caching indexsearcher
(and hereby the indexreader it creates in its constructor).
When not caching Ive made sure to close the indexs
You are opening and closing IndexSearcher for every search. Try by caching
IndexSearcher and do reopen the IndexReader, when the index gets modified.
In your code below, How did you create IndexSearcher. If it is using
IndexReader and you need to close that too. This might be the cause of
mem