一直困扰于 indexSearcher 的重新 new ,query filter 的cache 没了。
重读solr ,发现非常好。也许我应该考虑用 solr 了。
Caching
- Configurable Query Result, Filter, and Document cache instances
- Pluggable Cache implementations
- Cache warming in background
-
When a new searcher is opened, configurable searches are run against it
in order to warm it up to avoid slow first hits. During warming, the
current searcher handles live requests.
- Autowarming in background
- The
most recently accessed items in the caches of the current searcher are
re-populated in the new searcher, enabing high cache hit rates across
index/searcher changes.
- Fast/small filter implementation
- User level caching with autowarming support
9-26
今天,我发现,我可以用不同的方式实现cache ,也许在我的情况下比solr 的方式更好。
西津渡