Github user moshebla commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/416#discussion_r210482225
--- Diff:
solr/core/src/java/org/apache/solr/response/transform/ChildDocTransformer.java
---
@@ -87,7 +87,12 @@ public void transform(SolrDocument rootDoc, int
rootDocId) {
final int segBaseId = leafReaderContext.docBase;
final int segRootId = rootDocId - segBaseId;
final BitSet segParentsBitSet =
parentsFilter.getBitSet(leafReaderContext);
- final int segPrevRootId = segParentsBitSet.prevSetBit(segRootId -
1); // can return -1 and that's okay
+ final int segPrevRootId = rootDocId==0? -1:
segParentsBitSet.prevSetBit(segRootId - 1); // can return -1 and that's okay
+
+ if(segPrevRootId == (rootDocId - 1)) {
--- End diff --
If segRootId is 0, segParentsBitSet.prevSetBit(-1) throws an assertion
error, since the index has to be >= 0.
I will fix line 92
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]