You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ro...@apache.org on 2022/09/14 12:43:37 UTC
[lucene] branch branch_9_4 updated: Removed duplicate check in SpanGradientFormatter (#11762)
This is an automated email from the ASF dual-hosted git repository.
romseygeek pushed a commit to branch branch_9_4
in repository https://gitbox.apache.org/repos/asf/lucene.git
The following commit(s) were added to refs/heads/branch_9_4 by this push:
new 99a17d30e02 Removed duplicate check in SpanGradientFormatter (#11762)
99a17d30e02 is described below
commit 99a17d30e02163ba8f1459ff2012b33f1e869376
Author: Alexander Münch <th...@users.noreply.github.com>
AuthorDate: Wed Sep 14 14:37:31 2022 +0200
Removed duplicate check in SpanGradientFormatter (#11762)
---
.../java/org/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;