Example usage for org.apache.solr.search SolrIndexSearcher cacheDocSet

List of usage examples for org.apache.solr.search SolrIndexSearcher cacheDocSet

Introduction

In this page you can find the example usage for org.apache.solr.search SolrIndexSearcher cacheDocSet.

Prototype

public void cacheDocSet(Query query, DocSet optionalAnswer, boolean mustCache) throws IOException 

Source Link

Document

Compute and cache the DocSet that matches a query.

Usage

From source file:org.alfresco.solr.FilterCacheRegenerator.java

License:Open Source License

@Override
public boolean regenerateItem(SolrIndexSearcher newSearcher, SolrCache newCache, SolrCache oldCache,
        Object oldKey, Object oldVal) throws IOException {
    if (oldKey instanceof Query) {
        Object cache = newSearcher.cacheLookup(AlfrescoSolrEventListener.ALFRESCO_CACHE,
                AlfrescoSolrEventListener.KEY_ALL_LEAF_DOCS);
        if (cache != null) {
            newSearcher.cacheDocSet((Query) oldKey, null, false);
        }/*www.  j  av  a2 s  . c o m*/
    }
    return true;

}