Package org.apache.lucene.facet.taxonomy

Examples of org.apache.lucene.facet.taxonomy.ParallelTaxonomyArrays


      for (MatchingDocs md : matchingDocs) {
        aggregator.aggregate(md, clp, facetArrays);
      }
    }
   
    ParallelTaxonomyArrays arrays = taxonomyReader.getParallelTaxonomyArrays();
   
    // compute top-K
    final int[] children = arrays.children();
    final int[] siblings = arrays.siblings();
    List<FacetResult> res = new ArrayList<FacetResult>();
    for (FacetRequest fr : searchParams.facetRequests) {
      int rootOrd = taxonomyReader.getOrdinal(fr.categoryPath);
      if (rootOrd == TaxonomyReader.INVALID_ORDINAL) { // category does not exist
        // Add empty FacetResult
View Full Code Here


    if (depth > Short.MAX_VALUE - 3) {
      depth = Short.MAX_VALUE -3;
    }

    int endOffset = offset + partitionSize; // one past the largest ordinal in the partition
    ParallelTaxonomyArrays childrenArray = taxonomyReader.getParallelTaxonomyArrays();
    int[] children = childrenArray.children();
    int[] siblings = childrenArray.siblings();
    int totalNumOfDescendantsConsidered = 0; // total number of facets with value != 0,
    // in the tree. These include those selected as top K in each node, and all the others that
    // were not. Not including rootNode

    // the following priority queue will be used again and again for each node recursed into
View Full Code Here

   */
  private int heapDescendants(int ordinal, Heap<FacetResultNode> pq, FacetResultNode parentResultNode,
      int offset) throws IOException {
    int partitionSize = facetArrays.arrayLength;
    int endOffset = offset + partitionSize;
    ParallelTaxonomyArrays childrenArray = taxonomyReader.getParallelTaxonomyArrays();
    int[] children = childrenArray.children();
    int[] siblings = childrenArray.siblings();
    FacetResultNode reusable = null;
    int localDepth = 0;
    int depth = facetRequest.getDepth();
    int[] ordinalStack = new int[2+Math.min(Short.MAX_VALUE, depth)];
    int childrenCounter = 0;
View Full Code Here

    assert facetRequest.getSortOrder() == SortOrder.DESCENDING : "this handler always sorts results in descending order";
  }

  @Override
  public final FacetResult compute() throws IOException {
    ParallelTaxonomyArrays arrays = taxonomyReader.getParallelTaxonomyArrays();
    final int[] children = arrays.children();
    final int[] siblings = arrays.siblings();
   
    int rootOrd = taxonomyReader.getOrdinal(facetRequest.categoryPath);
       
    FacetResultNode root = new FacetResultNode(rootOrd, resolver.valueOf(rootOrd));
    root.label = facetRequest.categoryPath;
View Full Code Here

      for (MatchingDocs md : matchingDocs) {
        aggregator.aggregate(md, clp, facetArrays);
      }
    }
   
    ParallelTaxonomyArrays arrays = taxonomyReader.getParallelTaxonomyArrays();
   
    // compute top-K
    final int[] children = arrays.children();
    final int[] siblings = arrays.siblings();
    List<FacetResult> res = new ArrayList<FacetResult>();
    for (FacetRequest fr : searchParams.facetRequests) {
      int rootOrd = taxonomyReader.getOrdinal(fr.categoryPath);
      if (rootOrd == TaxonomyReader.INVALID_ORDINAL) { // category does not exist
        // Add empty FacetResult
View Full Code Here

            for (MatchingDocs md : matchingDocs) {
                aggregator.aggregate(md, clp, facetArrays);
            }
        }

        ParallelTaxonomyArrays arrays = taxonomyReader.getParallelTaxonomyArrays();

        // compute top-K
        final int[] children = arrays.children();
        final int[] siblings = arrays.siblings();
        List<FacetResult> res = new ArrayList<>();
        for (FacetRequest fr : searchParams.facetRequests) {
            int rootOrd = taxonomyReader.getOrdinal(fr.categoryPath);
            // category does not exist
            if (rootOrd == TaxonomyReader.INVALID_ORDINAL) {
View Full Code Here

   */
  private int heapDescendants(int ordinal, Heap<FacetResultNode> pq, FacetResultNode parentResultNode,
      int offset) throws IOException {
    int partitionSize = facetArrays.arrayLength;
    int endOffset = offset + partitionSize;
    ParallelTaxonomyArrays childrenArray = taxonomyReader.getParallelTaxonomyArrays();
    int[] children = childrenArray.children();
    int[] siblings = childrenArray.siblings();
    FacetResultNode reusable = null;
    int localDepth = 0;
    int depth = facetRequest.getDepth();
    int[] ordinalStack = new int[2+Math.min(Short.MAX_VALUE, depth)];
    int childrenCounter = 0;
View Full Code Here

      for (MatchingDocs md : matchingDocs) {
        aggregator.aggregate(md, clp, facetArrays);
      }
    }
   
    ParallelTaxonomyArrays arrays = taxonomyReader.getParallelTaxonomyArrays();
   
    // compute top-K
    final int[] children = arrays.children();
    final int[] siblings = arrays.siblings();
    List<FacetResult> res = new ArrayList<FacetResult>();
    for (FacetRequest fr : searchParams.facetRequests) {
      int rootOrd = taxonomyReader.getOrdinal(fr.categoryPath);
      if (rootOrd == TaxonomyReader.INVALID_ORDINAL) { // category does not exist
        // Add empty FacetResult
View Full Code Here

   */
  protected abstract int addSiblings(int ordinal, int[] siblings, PriorityQueue<FacetResultNode> pq);
 
  @Override
  public final FacetResult compute() throws IOException {
    ParallelTaxonomyArrays arrays = taxonomyReader.getParallelTaxonomyArrays();
    final int[] children = arrays.children();
    final int[] siblings = arrays.siblings();
   
    int rootOrd = taxonomyReader.getOrdinal(facetRequest.categoryPath);
       
    FacetResultNode root = new FacetResultNode(rootOrd, valueOf(rootOrd));
    root.label = facetRequest.categoryPath;
View Full Code Here

    if (depth > Short.MAX_VALUE - 3) {
      depth = Short.MAX_VALUE -3;
    }

    int endOffset = offset + partitionSize; // one past the largest ordinal in the partition
    ParallelTaxonomyArrays childrenArray = taxonomyReader.getParallelTaxonomyArrays();
    int[] children = childrenArray.children();
    int[] siblings = childrenArray.siblings();
    int totalNumOfDescendantsConsidered = 0; // total number of facets with value != 0,
    // in the tree. These include those selected as top K in each node, and all the others that
    // were not. Not including rootNode

    // the following priority queue will be used again and again for each node recursed into
View Full Code Here

TOP

Related Classes of org.apache.lucene.facet.taxonomy.ParallelTaxonomyArrays

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.