Skip to content

Commit

Permalink
Expand the log message for case when we reached the threshold of hits…
Browse files Browse the repository at this point in the history
…, add some code level comments

Signed-off-by: Martin Gaievski <[email protected]>
  • Loading branch information
martin-gaievski committed Nov 25, 2024
1 parent ccc5809 commit 0df0b43
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,12 @@ public int docID() {
*/
public float[] hybridScores() throws IOException {
float[] scores = new float[numSubqueries];
//retrieves sub-matches using DisjunctionDisiScorer's two-phase iteration process.
//while the two-phase iterator can efficiently skip blocks of document IDs during matching,
//the DisiWrapper (obtained from subScorersPQ.topList()) ensures sequential document ID iteration.
//this is necessary for maintaining correct scoring order.
DisiWrapper topList = getSubMatches();

for (HybridDisiWrapper disiWrapper = (HybridDisiWrapper) topList; disiWrapper != null; disiWrapper =
(HybridDisiWrapper) disiWrapper.next) {
// check if this doc has match in the subQuery. If not, add score as 0.0 and continue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@ public void collect(int doc) throws IOException {
continue;
}
if (hitsThresholdChecker.isThresholdReached() && totalHitsRelation == TotalHits.Relation.EQUAL_TO) {
log.info("reached hits threshold check");
log.info(
"hit count threshold reached: total hits={}, threshold={}, action=updating_results",
totalHits,
hitsThresholdChecker.getTotalHitsThreshold()
);
totalHitsRelation = TotalHits.Relation.GREATER_THAN_OR_EQUAL_TO;
}
collectedHitsPerSubQuery[i]++;
Expand Down

0 comments on commit 0df0b43

Please sign in to comment.