<freeStyleBuild _class='hudson.model.FreeStyleBuild'><action _class='hudson.model.CauseAction'><cause _class='hudson.model.Cause$UpstreamCause'><shortDescription>Started by upstream project "Lucene-MMAPv2-Windows" build number 3,769</shortDescription><upstreamBuild>3769</upstreamBuild><upstreamProject>Lucene-MMAPv2-Windows</upstreamProject><upstreamUrl>job/Lucene-MMAPv2-Windows/</upstreamUrl></cause></action><action></action><action _class='hudson.plugins.git.util.BuildData'><buildsByBranchName><refsremotesoriginmain _class='hudson.plugins.git.util.Build'><buildNumber>1867</buildNumber><marked><SHA1>6f3c1d7ad69a7bb28aff73c0accec05cf252ea24</SHA1><branch><SHA1>6f3c1d7ad69a7bb28aff73c0accec05cf252ea24</SHA1><name>refs/remotes/origin/main</name></branch></marked><revision><SHA1>6f3c1d7ad69a7bb28aff73c0accec05cf252ea24</SHA1><branch><SHA1>6f3c1d7ad69a7bb28aff73c0accec05cf252ea24</SHA1><name>refs/remotes/origin/main</name></branch></revision></refsremotesoriginmain></buildsByBranchName><lastBuiltRevision><SHA1>6f3c1d7ad69a7bb28aff73c0accec05cf252ea24</SHA1><branch><SHA1>6f3c1d7ad69a7bb28aff73c0accec05cf252ea24</SHA1><name>refs/remotes/origin/main</name></branch></lastBuiltRevision><remoteUrl>https://gitbox.apache.org/repos/asf/lucene.git</remoteUrl><scmName></scmName></action><action></action><action></action><action _class='hudson.model.ParametersAction'></action><action _class='hudson.tasks.junit.TestResultAction'><failCount>0</failCount><skipCount>774</skipCount><totalCount>17693</totalCount><urlName>testReport</urlName></action><action></action><action></action><action></action><action></action><action _class='org.jenkinsci.plugins.displayurlapi.actions.RunDisplayAction'></action><building>false</building><description>Java: 64bit/hotspot/jdk-26 -XX:+UseCompressedOops -XX:+UseSerialGC</description><displayName>#1867</displayName><duration>537651</duration><estimatedDuration>546721</estimatedDuration><fullDisplayName>Lucene-MMAPv2-macOS #1867</fullDisplayName><id>1867</id><inProgress>false</inProgress><keepLog>false</keepLog><number>1867</number><queueId>224953</queueId><result>SUCCESS</result><timestamp>1783501487595</timestamp><url>https://jenkins.thetaphi.de/view/Lucene/job/Lucene-MMAPv2-macOS/1867/</url><builtOn>macOS VM</builtOn><changeSet _class='hudson.plugins.git.GitChangeSetList'><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>lucene/core/src/java/org/apache/lucene/search/ReqExclBulkScorer.java</affectedPath><affectedPath>lucene/core/src/test/org/apache/lucene/search/TestDenseConjunctionBulkScorer.java</affectedPath><affectedPath>lucene/core/src/java/org/apache/lucene/search/TwoPhaseIterator.java</affectedPath><commitId>6f3c1d7ad69a7bb28aff73c0accec05cf252ea24</commitId><timestamp>1783500466000</timestamp><author><absoluteUrl>https://jenkins.thetaphi.de/user/jim.ferenczi</absoluteUrl><fullName>jim.ferenczi</fullName></author><authorEmail>jim.ferenczi@elastic.co</authorEmail><comment>Revert TwoPhaseIterator#docIDRunEnd default to approximation().docID()

The default was changed in #16307 to return docID()+1, mirroring
DocIdSetIterator. That is wrong for a TwoPhaseIterator: its current
approximation doc is only a candidate until matches() confirms it.
DenseConjunctionBulkScorer#scoreWindow consults docIDRunEnd() before
matches(), so an optimistic docID()+1 let a width-1 window treat an
unconfirmed (possibly out-of-range) boundary doc as a fully-matching run
and collect it via collectRange, causing an off-by-one over-count (e.g.
TestRangeFacetCounts#testRandomLongsMultiValued).

Restore the conservative default (report no matching run) and document
why it differs from DocIdSetIterator. The ReqExclBulkScorer optimization
is unaffected: it calls docIDRunEnd() only after matches() and already
clamps to at least upTo+1.

Add a DenseConjunctionBulkScorer test asserting that a two-phase clause
on the default docIDRunEnd() collects the same docs whether scored in one
pass or as adjacent width-1 windows -- the partition invariance that
intra-segment search concurrency relies on.
</comment><date>2026-07-08 10:47:46 +0200</date><id>6f3c1d7ad69a7bb28aff73c0accec05cf252ea24</id><msg>Revert TwoPhaseIterator#docIDRunEnd default to approximation().docID()</msg><path><editType>edit</editType><file>lucene/core/src/java/org/apache/lucene/search/ReqExclBulkScorer.java</file></path><path><editType>edit</editType><file>lucene/core/src/java/org/apache/lucene/search/TwoPhaseIterator.java</file></path><path><editType>edit</editType><file>lucene/core/src/test/org/apache/lucene/search/TestDenseConjunctionBulkScorer.java</file></path></item><kind>git</kind></changeSet><culprit><absoluteUrl>https://jenkins.thetaphi.de/user/jim.ferenczi</absoluteUrl><fullName>jim.ferenczi</fullName></culprit></freeStyleBuild>