Apache Lucene open-source search software
SOLR-11798: Formally deprecate top-level <highlighting> syntax in solrconfig.xml in favour of <searchComponent> equivalent syntax.
Christine Poerschke5d4f029fdd0b
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex d30015e520e..7137b8079d2 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -57,6 +57,9 @@ Upgrade NotesAutoscaling API which is now a no-op. Use the 'triggerCooldownPeriodSeconds' instead to pause eventprocessing.+* SOLR-11798: The top-level <highlighting> syntax in solrconfig.xml is now formally+ deprecated in favour of <searchComponent> equivalent syntax. See also SOLR-1696.+New Features----------------------* SOLR-11285: Simulation framework for autoscaling. (ab)@@ -107,6 +110,9 @@ Other Changes* SOLR-11805: SolrJ's SolrResponse.getElaspedTime was sometimes a millisecond off. (David Smiley)+* SOLR-11798: Formally deprecate top-level <highlighting> syntax in solrconfig.xml+ in favour of <searchComponent> equivalent syntax. (Christine Poerschke)+================== 7.2.0 ==================Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.diff --git a/solr/core/src/java/org/apache/solr/handler/component/HighlightComponent.java b/solr/core/src/java/org/apache/solr/handler/component/HighlightComponent.javaindex f1c9680e4f0..698cc052612 100644--- a/solr/core/src/java/org/apache/solr/handler/component/HighlightComponent.java+++ b/solr/core/src/java/org/apache/solr/handler/component/HighlightComponent.java@@ -25,6 +25,7 @@ import java.util.stream.Stream;import com.google.common.base.Objects;import org.apache.lucene.search.Query;+import org.apache.lucene.util.Version;import org.apache.solr.common.SolrException;import org.apache.solr.common.params.HighlightParams;import org.apache.solr.common.params.SolrParams;@@ -46,6 +47,7 @@ import org.apache.solr.util.plugin.PluginInfoInitialized;import org.apache.solr.util.plugin.SolrCoreAware;import static java.util.stream.Collectors.toMap;+import static org.apache.solr.core.Config.assertWarnOrFail;/*** TODO!@@ -131,6 +133,11 @@ public class HighlightComponent extends SearchComponent implements PluginInfoIniList<PluginInfo> children = info.getChildren("highlighting");if(children.isEmpty()) {PluginInfo pluginInfo = core.getSolrConfig().getPluginInfo(SolrHighlighter.class.getName()); //TODO deprecated configuration remove later+ assertWarnOrFail("solrconfig.xml <highlighting> configuration is deprecated since SOLR-1696 "+ + "and no longer supported from Solr 7.3 onwards. "+ + "Please configure via <searchComponent> instead.",+ (null == pluginInfo),+ core.getSolrConfig().luceneMatchVersion.onOrAfter(Version.LUCENE_7_3_0));if (pluginInfo != null) {solrConfigHighlighter = core.createInitInstance(pluginInfo, SolrHighlighter.class, null, DefaultSolrHighlighter.class.getName());} else {