Hmmm, I think so. Can you make a test case showing the issue? But, in the next line we set childTarget = Math.max(childTarget, firstChild) ... so this implies the incoming arg to advance (childTarget) was invalid? (Ie, it was in fact a parent docId).
Mike McCandless http://blog.mikemccandless.com On Mon, Sep 1, 2014 at 2:56 AM, Ravikumar Govindarajan <[email protected]> wrote: > Sometimes TCBJQ returns parent-doc itself as a child-doc. I traced it down > to the following code... > > public int advance(int childTarget) throws IOException { > > ....... > > final int firstChild = parentBits.prevSetBit(parentDoc-1); > > //System.out.println(" firstChild=" + firstChild); > > childTarget = Math.max(childTarget, firstChild); > > ........ > > } > > Shoudn't it be > > final int firstChild = 1 + parentBits.prevSetBit(parentDoc-1) ?? > > -- > > Ravi --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
