From 5de685cfba8741b8c59b25d800cd69fe8b41eea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20M=C3=BCnch?= Date: Wed, 14 Sep 2022 14:37:31 +0200 Subject: [PATCH] Removed duplicate check in SpanGradientFormatter (#11762) --- .../apache/lucene/search/highlight/SpanGradientFormatter.java | 1 - 1 file changed, 1 deletion(-) diff --git a/lucene/highlighter/src/java/org/apache/lucene/search/highlight/SpanGradientFormatter.java b/lucene/highlighter/src/java/org/apache/lucene/search/highlight/SpanGradientFormatter.java index 0871f5e149f..ec25cf782dc 100644 --- a/lucene/highlighter/src/java/org/apache/lucene/search/highlight/SpanGradientFormatter.java +++ b/lucene/highlighter/src/java/org/apache/lucene/search/highlight/SpanGradientFormatter.java @@ -34,7 +34,6 @@ public class SpanGradientFormatter extends GradientFormatter { @Override public String highlightTerm(String originalText, TokenGroup tokenGroup) { - if (tokenGroup.getTotalScore() == 0) return originalText; float score = tokenGroup.getTotalScore(); if (score == 0) { return originalText;