mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-23 13:09:00 +00:00
(index) Fix bug where tcfFirstPosition lit up because one term was in the title and the other was missing from the document
This was because firstPosition calculation was not invalidated when positions were missing.
This commit is contained in:
parent
162fc25ebc
commit
3dec4b6b34
@ -446,10 +446,13 @@ public class IndexResultScoreCalculator {
|
||||
|
||||
for (int i = 0; i < compiledQuery.size(); i++) {
|
||||
|
||||
if (positions[i] == null || !regularMask.get(i))
|
||||
if (!regularMask.get(i))
|
||||
continue;
|
||||
|
||||
if (positions[i].isEmpty()) continue;
|
||||
if (positions[i] == null || positions[i].isEmpty()) {
|
||||
firstPosition = Integer.MAX_VALUE;
|
||||
continue;
|
||||
}
|
||||
|
||||
firstPosition = Math.max(firstPosition, positions[i].getInt(0));
|
||||
searchableKeywordCount ++;
|
||||
|
Loading…
Reference in New Issue
Block a user