In CachedFilterBuilder, there are 1) (key=query, value=QueryWrapperFilter) 2) (key=filter, value = CachingWrapperFilter).
For cached CachingWrapperFilter, I can understand how it caches since the underlying docIdSet is cached if it is cacheable, or is cloned if it is not cacheable. Thus, the performance can be improved. However, for QueryWrapperFilter, I am wondering how it can help performance. It does not cache the underlying docIdSet. Thus, each time its getDocIdSet is called, the entire scorer is built from scratch, right (except the underlying posting list are cached somehow)? Can anybody help me with this ? thanks! hao