I currently have a lucene app. which is a daemon listening on a port for
XML requests and servicing these. I'm intending to switch to using Solr in
the near(ish) future, but have a question.
In my daemon, for servicing incoming search requests I manage index
Searchers in a cache via the following cases:.
1) there's is no cached Searcher:
- create a new Searcher and cache it
2) there is a cached Searcher, and index has NOT been updated since it
- use cached Searcher.
3) there is a cached Searcher, and index HAS been updated since it
- if the cache limit is not reached flag current Searcher as "old",
create new Searcher and cache it, else if cache limit reached return
Searchers flagged as "old" get retired as soon as they finish servicing any
The question I have regarding Solr is: does it do something similar? If
so can someone please describe the process - thanks.
I am particularly interested in a provision for a cap on creation of new
Searchers, as described in (3) above. As my index has grown, and the system
updates it frequently, I found that an open-ended approach to creation of
new Searchers in the event of index change was leading to out-of-memory