<table><tr><td style="">michaelh added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D11828">View Revision</a></tr></table><br /><div><div><p>I'm not very familiar with the concept of iterators (yet). To me it looks like <tt style="background: #ebebeb; font-size: 13px;">auto i = new OrPostingIterator(iters); i->docId();</tt> will return 0 and <tt style="background: #ebebeb; font-size: 13px;">i->next()</tt> returns a valid docId. After that <tt style="background: #ebebeb; font-size: 13px;">i->docId();</tt> is also valid.<br />
Is this how iterators work? Naively I would expect <tt style="background: #ebebeb; font-size: 13px;">i->docId();</tt> to be valid after construction or both <tt style="background: #ebebeb; font-size: 13px;">i->docId();</tt> and <tt style="background: #ebebeb; font-size: 13px;">i->next()</tt> to be invalid.</p>

<p>I have to admit, it's very difficult to understand (and I don't, really) what baloo is doing here with all this iterating over vectors of inherited iterator classes, pointer-to-pointer stuff of which some might not even exist. My brain hurts, terribly! All I can presently do is ask some simple questions. Sorry, I'm of no help here. Please take my comments as a device for better understanding and I hope it's not to much of a bother.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R293 Baloo</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D11828">https://phabricator.kde.org/D11828</a></div></div><br /><div><strong>To: </strong>bruns, Baloo, michaelh<br /><strong>Cc: </strong>Frameworks, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, alexeymin<br /></div>