Package org.apache.lucene.facet.params.CategoryListParams

Examples of org.apache.lucene.facet.params.CategoryListParams.OrdinalPolicy


        res.add(emptyResult(rootOrd, fr));
        continue;
      }
      CategoryListParams clp = searchParams.indexingParams.getCategoryListParams(fr.categoryPath);
      if (fr.categoryPath.length > 0) { // someone might ask to aggregate the ROOT category
        OrdinalPolicy ordinalPolicy = clp.getOrdinalPolicy(fr.categoryPath.components[0]);
        if (ordinalPolicy == OrdinalPolicy.NO_PARENTS) {
          // rollup values
          aggregator.rollupValues(fr, rootOrd, children, siblings, facetArrays);
        }
      }
View Full Code Here


    Iterator<CategoryPath> iter = categories.iterator();
    for (int i = 0; i < upto; i++) {
      int ordinal = ordinals.ints[i];
      CategoryPath cp = iter.next();
      OrdinalPolicy op = clp.getOrdinalPolicy(cp.components[0]);
      if (op != OrdinalPolicy.NO_PARENTS) {
        // need to add parents too
        int parent = taxoWriter.getParent(ordinal);
        if (parent > 0) {
          // only do this if the category is not a dimension itself, otherwise, it was just discarded by the 'if' below
View Full Code Here

   */
  @Test
  public void testSimple() throws Exception {
    for (int partitionSize : partitionSizes) {
      FacetIndexingParams fip = getFacetIndexingParams(partitionSize);
      OrdinalPolicy op = fip.getCategoryListParams(null).getOrdinalPolicy(null);
      initIndex(fip);

      List<FacetRequest> facetRequests = new ArrayList<FacetRequest>();
      facetRequests.add(new CountFacetRequest(new CategoryPath("a"), 100));
      CountFacetRequest cfra = new CountFacetRequest(new CategoryPath("a"), 100);
View Full Code Here

    Iterator<CategoryPath> iter = categories.iterator();
    for (int i = 0; i < upto; i++) {
      int ordinal = ordinals.ints[i];
      CategoryPath cp = iter.next();
      OrdinalPolicy op = clp.getOrdinalPolicy(cp.components[0]);
      if (op != OrdinalPolicy.NO_PARENTS) {
        // need to add parents too
        int parent = taxoWriter.getParent(ordinal);
        while (parent > 0) {
          ordinals.ints[ordinals.length++] = parent;
View Full Code Here

        root.value = 0;
        res.add(new FacetResult(fr, root, 0));
        continue;
      }
      CategoryListParams clp = searchParams.indexingParams.getCategoryListParams(fr.categoryPath);
      OrdinalPolicy ordinalPolicy = clp .getOrdinalPolicy(fr.categoryPath.components[0]);
      if (ordinalPolicy == OrdinalPolicy.NO_PARENTS) {
        // rollup values
        aggregator.rollupValues(fr, rootOrd, children, siblings, facetArrays);
      }
     
View Full Code Here

        res.add(emptyResult(rootOrd, fr));
        continue;
      }
      CategoryListParams clp = searchParams.indexingParams.getCategoryListParams(fr.categoryPath);
      if (fr.categoryPath.length > 0) { // someone might ask to aggregate the ROOT category
        OrdinalPolicy ordinalPolicy = clp.getOrdinalPolicy(fr.categoryPath.components[0]);
        if (ordinalPolicy == OrdinalPolicy.NO_PARENTS) {
          // rollup values
          aggregator.rollupValues(fr, rootOrd, children, siblings, facetArrays);
        }
      }
View Full Code Here

                continue;
            }
            CategoryListParams clp = searchParams.indexingParams.getCategoryListParams(fr.categoryPath);
            // someone might ask to aggregate ROOT category
            if (fr.categoryPath.length > 0) {
                OrdinalPolicy ordinalPolicy = clp.getOrdinalPolicy(fr.categoryPath.components[0]);
                if (ordinalPolicy == OrdinalPolicy.NO_PARENTS) {
                    // rollup values
                    aggregator.rollupValues(fr, rootOrd, children, siblings, facetArrays);
                }
            }
View Full Code Here

        res.add(emptyResult(rootOrd, fr));
        continue;
      }
      CategoryListParams clp = searchParams.indexingParams.getCategoryListParams(fr.categoryPath);
      if (fr.categoryPath.length > 0) { // someone might ask to aggregate the ROOT category
        OrdinalPolicy ordinalPolicy = clp.getOrdinalPolicy(fr.categoryPath.components[0]);
        if (ordinalPolicy == OrdinalPolicy.NO_PARENTS) {
          // rollup values
          aggregator.rollupValues(fr, rootOrd, children, siblings, facetArrays);
        }
      }
View Full Code Here

TOP

Related Classes of org.apache.lucene.facet.params.CategoryListParams.OrdinalPolicy

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.