You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mv...@apache.org on 2017/01/29 21:44:37 UTC
[3/4] lucene-solr:branch_6x: LUCENE-6959: Removed
ToParentBlockJoinCollector in favour of ParentChildrenBlockJoinQuery,
that can return the matching children documents per parent document. This
query should be executed for each matching parent document a
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/91a62079/solr/core/src/java/org/apache/solr/search/join/BlockJoinFacetAccsHolder.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/join/BlockJoinFacetAccsHolder.java b/solr/core/src/java/org/apache/solr/search/join/BlockJoinFacetAccsHolder.java
index bf7f7b2..6a1a4fb 100644
--- a/solr/core/src/java/org/apache/solr/search/join/BlockJoinFacetAccsHolder.java
+++ b/solr/core/src/java/org/apache/solr/search/join/BlockJoinFacetAccsHolder.java
@@ -19,11 +19,9 @@ package org.apache.solr.search.join;
import java.io.IOException;
import org.apache.lucene.index.LeafReaderContext;
-import org.apache.lucene.search.join.ToParentBlockJoinQuery.ChildrenMatchesScorer;
import org.apache.solr.common.util.NamedList;
import org.apache.solr.request.SolrQueryRequest;
import org.apache.solr.search.join.BlockJoinFieldFacetAccumulator.AggregatableDocIter;
-import org.apache.solr.search.join.BlockJoinFieldFacetAccumulator.SortedIntsAggDocIterator;
/**
* For each collected parent document creates matched block, which is a docSet with matched children and parent doc
@@ -32,8 +30,6 @@ import org.apache.solr.search.join.BlockJoinFieldFacetAccumulator.SortedIntsAggD
class BlockJoinFacetAccsHolder {
private BlockJoinFieldFacetAccumulator[] blockJoinFieldFacetAccumulators;
private boolean firstSegment = true;
- private ChildrenMatchesScorer blockJoinScorer;
- private int[] childDocs = new int[0];
BlockJoinFacetAccsHolder(SolrQueryRequest req) throws IOException {
String[] facetFieldNames = BlockJoinFacetComponentSupport.getChildFacetFields(req);
@@ -61,16 +57,6 @@ class BlockJoinFacetAccsHolder {
}
}
- protected void incrementFacets(int parent) throws IOException {
- final int[] docNums = blockJoinScorer.swapChildDocs(childDocs);
- // now we don't
- //includeParentDoc(parent);
- //final int childCountPlusParent = childTracking.getChildCount()+1;
- final int childCountNoParent = blockJoinScorer.getChildCount();
- final SortedIntsAggDocIterator iter = new SortedIntsAggDocIterator(docNums, childCountNoParent, parent);
- countFacets(iter);
- }
-
/** is not used
protected int[] includeParentDoc(int parent) {
final int[] docNums = ArrayUtil.grow(childTracking.getChildDocs(), childTracking.getChildCount()+1);