You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ep...@apache.org on 2024/03/25 12:25:55 UTC

(solr) branch main updated: SOLR-12089 follow-up: Remove deprecated `breakSugestionTieBreaker` parameter (#2365)

This is an automated email from the ASF dual-hosted git repository.

epugh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/main by this push:
     new a30c58e53d8 SOLR-12089 follow-up: Remove deprecated `breakSugestionTieBreaker` parameter (#2365)
a30c58e53d8 is described below

commit a30c58e53d8d1bcdec1939f480801f8f0ee858a4
Author: Andrey Bozhko <an...@gmail.com>
AuthorDate: Mon Mar 25 07:25:49 2024 -0500

    SOLR-12089 follow-up: Remove deprecated `breakSugestionTieBreaker` parameter (#2365)
    
    * remove deprecated parameter and associated logging.
---
 solr/CHANGES.txt                                   |  2 ++
 .../solr/spelling/WordBreakSolrSpellChecker.java   | 25 ----------------------
 2 files changed, 2 insertions(+), 25 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 7cf02fdbe19..fbc4eb1cf5e 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -56,6 +56,8 @@ Deprecation Removals
   end in "/solr").  Users may still specify a default collection through use of the `withDefaultCollection` method available
   on most SolrClient builders. (Jason Gerlowski, David Smiley, Eric Pugh)
 
+* SOLR-12089: Remove deprecated `breakSugestionTieBreaker` parameter in favor of `breakSuggestionTieBreaker`
+  in WordBreakSolrSpellChecker (Andrey Bozhko via Eric Pugh)
 
 Dependency Upgrades
 ---------------------
diff --git a/solr/core/src/java/org/apache/solr/spelling/WordBreakSolrSpellChecker.java b/solr/core/src/java/org/apache/solr/spelling/WordBreakSolrSpellChecker.java
index db7bd7f5665..9086101bf44 100644
--- a/solr/core/src/java/org/apache/solr/spelling/WordBreakSolrSpellChecker.java
+++ b/solr/core/src/java/org/apache/solr/spelling/WordBreakSolrSpellChecker.java
@@ -17,7 +17,6 @@
 package org.apache.solr.spelling;
 
 import java.io.IOException;
-import java.lang.invoke.MethodHandles;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
@@ -33,8 +32,6 @@ import org.apache.lucene.search.spell.WordBreakSpellChecker.BreakSuggestionSortM
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.core.SolrCore;
 import org.apache.solr.search.SolrIndexSearcher;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * A spellchecker that breaks and combines words.
@@ -49,9 +46,6 @@ import org.slf4j.LoggerFactory;
  * properly sets these flags.
  */
 public class WordBreakSolrSpellChecker extends SolrSpellChecker {
-
-  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
-
   /** Try to combine multiple words into one? [true|false] */
   public static final String PARAM_COMBINE_WORDS = "combineWords";
 
@@ -67,14 +61,6 @@ public class WordBreakSolrSpellChecker extends SolrSpellChecker {
   /** See {@link WordBreakSpellChecker#setMinBreakWordLength} */
   public static final String PARAM_MIN_BREAK_WORD_LENGTH = "minBreakLength";
 
-  /**
-   * See {@link BreakSuggestionTieBreaker} for options.
-   *
-   * @deprecated Only used for backwards compatibility. It will be removed in 10.x.
-   */
-  @Deprecated(since = "9.6")
-  private static final String PARAM_BREAK_SUGESTION_TIE_BREAKER = "breakSugestionTieBreaker";
-
   /** See {@link BreakSuggestionTieBreaker} for options. */
   public static final String PARAM_BREAK_SUGGESTION_TIE_BREAKER = "breakSuggestionTieBreaker";
 
@@ -106,17 +92,6 @@ public class WordBreakSolrSpellChecker extends SolrSpellChecker {
     breakWords = boolParam(config, PARAM_BREAK_WORDS);
     wbsp = new WordBreakSpellChecker();
     String bstb = strParam(config, PARAM_BREAK_SUGGESTION_TIE_BREAKER);
-    if (bstb == null) {
-      bstb = strParam(config, PARAM_BREAK_SUGESTION_TIE_BREAKER);
-      if (bstb != null && log.isWarnEnabled()) {
-        log.warn(
-            "Parameter '"
-                + PARAM_BREAK_SUGESTION_TIE_BREAKER
-                + "' is deprecated and will be removed in Solr 10.x. Please use '"
-                + PARAM_BREAK_SUGGESTION_TIE_BREAKER
-                + "' instead."); // nowarn
-      }
-    }
     if (bstb != null) {
       bstb = bstb.toUpperCase(Locale.ROOT);
       if (bstb.equals(BreakSuggestionTieBreaker.SUM_FREQ.name())) {