Package org.apache.lucene.facet.search

Examples of org.apache.lucene.facet.search.StandardFacetsAccumulator.accumulate()


    FacetsAccumulator acc = new StandardFacetsAccumulator(sParams, reader, taxo);
   
    // no use to test this with complement since at that mode all facets are taken
    acc.setComplementThreshold(FacetsAccumulator.DISABLE_COMPLEMENT);

    List<FacetResult> results = acc.accumulate(allDocs);
    assertEquals("Wrong #results", dimension.length, results.size());

    for (int i = 0; i < results.size(); i++) {
      FacetResult res = results.get(i);
      assertEquals("wrong num-descendants for dimension " + dimension[i],
View Full Code Here


  // compute facets with certain facet requests and docs
  private List<FacetResult> findFacets(ScoredDocIDs sDocids,
      FacetSearchParams facetSearchParams) throws IOException {
    FacetsAccumulator fAccumulator = new StandardFacetsAccumulator(
        facetSearchParams, indexReader, taxoReader);
    List<FacetResult> res = fAccumulator.accumulate(sDocids);

    // Results are ready, printing them...
    int i = 0;
    for (FacetResult facetResult : res) {
      if (VERBOSE) {
View Full Code Here

      FloatArrayAllocator faa = new FloatArrayAllocator(PartitionsUtils.partitionSize(facetSearchParams,tr), 1);
      FacetsAccumulator fctExtrctr = new StandardFacetsAccumulator(facetSearchParams, is.getIndexReader(), tr, iaa, faa);
      fctExtrctr.setComplementThreshold(FacetsAccumulator.DISABLE_COMPLEMENT);
      long start = System.currentTimeMillis();

      List<FacetResult> facetResults = fctExtrctr.accumulate(scoredDoc.getScoredDocIDs());

      long end = System.currentTimeMillis();
      if (VERBOSE) {
        System.out.println("Time: " + (end - start));
      }
View Full Code Here

    fAccumulator.setComplementThreshold(
        withComplement ?
            FacetsAccumulator.FORCE_COMPLEMENT:
              FacetsAccumulator.DISABLE_COMPLEMENT);
   
    List<FacetResult> res = fAccumulator.accumulate(sDocids);
   
    // Results are ready, printing them...
    int i = 0;
    for (FacetResult facetResult : res) {
      if (VERBOSE) {
View Full Code Here

        }
        return map;
      }
    };
    sfa.setComplementThreshold(StandardFacetsAccumulator.DISABLE_COMPLEMENT);
    sfa.accumulate(ScoredDocIdsUtils.createAllDocsScoredDocIDs(indexReader));
    return new TotalFacetCounts(taxonomy, facetIndexingParams, counts, CreationType.Computed);
  }
 
}
View Full Code Here

      FloatArrayAllocator faa = new FloatArrayAllocator(PartitionsUtils.partitionSize(facetSearchParams,tr), 1);
      FacetsAccumulator fctExtrctr = new StandardFacetsAccumulator(facetSearchParams, is.getIndexReader(), tr, iaa, faa);
      fctExtrctr.setComplementThreshold(FacetsAccumulator.DISABLE_COMPLEMENT);
      long start = System.currentTimeMillis();

      List<FacetResult> facetResults = fctExtrctr.accumulate(scoredDoc.getScoredDocIDs());

      long end = System.currentTimeMillis();
      if (VERBOSE) {
        System.out.println("Time: " + (end - start));
      }
View Full Code Here

    FacetsAccumulator acc = new StandardFacetsAccumulator(sParams, reader, taxo);
   
    // no use to test this with complement since at that mode all facets are taken
    acc.setComplementThreshold(FacetsAccumulator.DISABLE_COMPLEMENT);

    List<FacetResult> results = acc.accumulate(allDocs);
    assertEquals("Wrong #results", dimension.length, results.size());

    for (int i = 0; i < results.size(); i++) {
      FacetResult res = results.get(i);
      assertEquals("wrong num-descendants for dimension " + dimension[i],
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.