Package org.apache.lucene.facet.search.cache

Examples of org.apache.lucene.facet.search.cache.CategoryListCache


   * use it for the iteration.
   */
  public CategoryListIterator createCategoryListIterator(IndexReader reader,
      TaxonomyReader taxo, FacetSearchParams sParams, int partition)
      throws IOException {
    CategoryListCache clCache = sParams.getClCache();
    CategoryListParams clParams = sParams.getFacetIndexingParams().getCategoryListParams(categoryPath);
    if (clCache!=null) {
      CategoryListData clData = clCache.get(clParams);
      if (clData!=null) {
        return clData.iterator(partition);
      }
    }
    return clParams.createCategoryListIterator(reader, partition);
View Full Code Here


    populateIndex(iParams, indexDir, taxoDir);

    TaxonomyReader taxo = new LuceneTaxonomyReader(taxoDir);
    IndexReader reader = IndexReader.open(indexDir);

    CategoryListCache clCache = null;
    if (cacheCLI) {
      // caching the iteratorr, so:
      // 1: create the cached iterator, using original params
      clCache = new CategoryListCache();
      clCache.loadAndRegister(clp, reader, taxo, iParams);
    }
   
    ScoredDocIDs allDocs = ScoredDocIdsUtils
        .createAllDocsScoredDocIDs(reader);
View Full Code Here

    sParams.addFacetRequest(frq);
    if (withCache) {
      //let's use a cached cl data
      FacetIndexingParams iparams = sParams.getFacetIndexingParams();
      CategoryListParams clp = new CategoryListParams(); // default term ok as only single list
      CategoryListCache clCache = new CategoryListCache();
      clCache.loadAndRegister(clp, indexReader, taxoReader, iparams);
      if (plantWrongData) {
        // let's mess up the cached data and then expect a wrong result...
        messCachedData(clCache, clp);
      }
      sParams.setClCache(clCache);
View Full Code Here

    populateIndex(iParams, indexDir, taxoDir);

    TaxonomyReader taxo = new DirectoryTaxonomyReader(taxoDir);
    IndexReader reader = IndexReader.open(indexDir);

    CategoryListCache clCache = null;
    if (cacheCLI) {
      // caching the iteratorr, so:
      // 1: create the cached iterator, using original params
      clCache = new CategoryListCache();
      clCache.loadAndRegister(clp, reader, taxo, iParams);
    }
   
    ScoredDocIDs allDocs = ScoredDocIdsUtils
        .createAllDocsScoredDocIDs(reader);
View Full Code Here

TOP

Related Classes of org.apache.lucene.facet.search.cache.CategoryListCache

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.