(ranking) TermCoherenceFactory should be run for size=2 queries

This commit is contained in:
Viktor Lofgren 2024-04-21 12:29:25 +02:00
parent 214551f1df
commit 8769704462

View File

@ -14,7 +14,7 @@ public class TermCoherenceFactor {
* found in the same sentences.
*/
public double calculateOverlap(CompiledQueryLong wordMetadataQuery) {
if (wordMetadataQuery.size() <= 2)
if (wordMetadataQuery.size() < 2)
return 0;
long mask = CompiledQueryAggregates.longBitmaskAggregate(wordMetadataQuery,