Package org.apache.lucene.facet.complements

Examples of org.apache.lucene.facet.complements.TotalFacetCountsCache$TFCKey


    DirectoryReader indexReader = DirectoryReader.open(indexDir);
    TaxonomyReader taxoReader = new DirectoryTaxonomyReader(taxoDir);
   
    int[] intArray = new int[iParams.getPartitionSize()];

    TotalFacetCountsCache tfcc = TotalFacetCountsCache.getSingleton();
    File tmpFile = _TestUtil.createTempFile("test", "tmp", TEMP_DIR);
    tfcc.store(tmpFile, indexReader, taxoReader, iParams);
    tfcc.clear(); // not really required because TFCC overrides on load(), but in the test we need not rely on this.
    tfcc.load(tmpFile, indexReader, taxoReader, iParams);
   
    // now retrieve the one just loaded
    TotalFacetCounts totalCounts = tfcc.getTotalCounts(indexReader, taxoReader, iParams);

    int partition = 0;
    for (int i = 0; i < expectedCounts.length; i += partitionSize) {
      totalCounts.fillTotalCountsForPartition(intArray, partition);
      int[] partitionExpectedCounts = new int[partitionSize];
View Full Code Here

TOP

Related Classes of org.apache.lucene.facet.complements.TotalFacetCountsCache$TFCKey

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.