Skip to content

Apache Lucene open-source search software

SOLR-1696 : Deprecate old <highlighting> syntax and move configuration to HighlightComponent

Noble Paul2f81c7303585
diff --git a/CHANGES.txt b/CHANGES.txt
index 3ac2d9cdebb..bdef741f1c5 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -28,6 +28,8 @@ Upgrading from Solr 1.4
* Using solr.xml is recommended for single cores also (SOLR-1621)
+* Old syntax of <highlighting> is deprecated (SOLR-1696)
+
Versions of Major Components
---------------------
@@ -203,6 +205,8 @@ Other Changes
* SOLR-1588: Removed some very old dead code.
(Chris A. Mattmann via hossman)
+* SOLR-1696 : Deprecate old <highlighting> syntax and move configuration to HighlightComponent (noble)
+
Build
----------------------
diff --git a/example/solr/conf/solrconfig.xml b/example/solr/conf/solrconfig.xml
index 603563f07d9..f3e83b8f74b 100755
--- a/example/solr/conf/solrconfig.xml
+++ b/example/solr/conf/solrconfig.xml
@@ -928,7 +928,7 @@
<str name="echoHandler">true</str>
</lst>
</requestHandler>
-
+ <searchComponent class="solr.HighlightComponent" name="highlight">
<highlighting>
<!-- Configure the standard fragmenter -->
<!-- This could most likely be commented out in the "default" case -->
@@ -964,6 +964,7 @@
<!-- multi-colored tag FragmentsBuilder -->
<fragmentsBuilder name="colored" class="org.apache.solr.highlight.MultiColoredScoreOrderFragmentsBuilder" default="true"/>
</highlighting>
+ </searchComponent>
<!-- An example dedup update processor that creates the "id" field on the fly
based on the hash code of some other fields. This example has overwriteDupes
diff --git a/src/java/org/apache/solr/core/PluginInfo.java b/src/java/org/apache/solr/core/PluginInfo.java
index 1c330470335..be97adf9940 100644
--- a/src/java/org/apache/solr/core/PluginInfo.java
+++ b/src/java/org/apache/solr/core/PluginInfo.java
@@ -103,5 +103,6 @@ public class PluginInfo {
for (PluginInfo child : children) if(type.equals(child.type)) result.add(child);
return result;
}
+ public static final PluginInfo EMPTY_INFO = new PluginInfo("",Collections.<String,String>emptyMap(), new NamedList(),Collections.<PluginInfo>emptyList());
private static final HashSet<String> NL_TAGS = new HashSet<String>(Arrays.asList("lst","str","int","bool","arr","float","double"));
}
diff --git a/src/java/org/apache/solr/core/SolrConfig.java b/src/java/org/apache/solr/core/SolrConfig.java
index 4b2e7ffa3fe..9199bcd4ec2 100644
--- a/src/java/org/apache/solr/core/SolrConfig.java
+++ b/src/java/org/apache/solr/core/SolrConfig.java
@@ -193,7 +193,12 @@ public class SolrConfig extends Config {
loadPluginInfo(IndexDeletionPolicy.class,"mainIndex/deletionPolicy",false, true);
loadPluginInfo(IndexReaderFactory.class,"indexReaderFactory",false, true);
loadPluginInfo(UpdateRequestProcessorChain.class,"updateRequestProcessorChain",false, false);
+
+ //TODO deprecated remove it later
loadPluginInfo(SolrHighlighter.class,"highlighting",false, false);
+ if( pluginStore.containsKey( SolrHighlighter.class.getName() ) )
+ log.warn( "Deprecated syntax found. <highlighting/> should move to <searchComponent/>" );
+
updateHandlerInfo = loadUpdatehandlerInfo();
Config.log.info("Loaded SolrConfig: " + name);
diff --git a/src/java/org/apache/solr/core/SolrCore.java b/src/java/org/apache/solr/core/SolrCore.java
index 6603ccb73d5..8c445cd2da3 100644
--- a/src/java/org/apache/solr/core/SolrCore.java
+++ b/src/java/org/apache/solr/core/SolrCore.java
@@ -96,7 +96,6 @@ public final class SolrCore implements SolrInfoMBean {
private final UpdateHandler updateHandler;
private final long startTime;
private final RequestHandlers reqHandlers;
- private final SolrHighlighter highlighter;
private final Map<String,SearchComponent> searchComponents;
private final Map<String,UpdateRequestProcessorChain> updateProcessorChains;
private final Map<String, SolrInfoMBean> infoRegistry;
@@ -463,10 +462,7 @@ public final class SolrCore implements SolrInfoMBean {
return createInstance(className, UpdateHandler.class, "Update Handler");
}
- private SolrHighlighter createHighlighter(String className) {
- return createInstance(className, SolrHighlighter.class, "Highlighter");
- }
-
+
/**
* @return the last core initialized. If you are using multiple cores,
* this is not a function to use.
@@ -565,7 +561,6 @@ public final class SolrCore implements SolrInfoMBean {
reqHandlers = new RequestHandlers(this);
reqHandlers.initHandlersFromConfig( solrConfig );
- highlighter = initHighlighter();
// Handle things that should eventually go away
initDeprecatedSupport();
@@ -615,19 +610,6 @@ public final class SolrCore implements SolrInfoMBean {
resourceLoader.inform(infoRegistry);
}
- private SolrHighlighter initHighlighter() {
- SolrHighlighter highlighter = null;
- PluginInfo pluginInfo = solrConfig.getPluginInfo(SolrHighlighter.class.getName());
- if(pluginInfo != null){
- highlighter = createInitInstance(pluginInfo,SolrHighlighter.class,null, DefaultSolrHighlighter.class.getName());
- highlighter.initalize(solrConfig);
- } else{
- highlighter = new DefaultSolrHighlighter();
- highlighter.initalize(solrConfig);
- }
- return highlighter;
- }
-
/**
* Load the request processors
@@ -805,8 +787,10 @@ public final class SolrCore implements SolrInfoMBean {
/**
* Get the SolrHighlighter
*/
+ @Deprecated
public SolrHighlighter getHighlighter() {
- return highlighter;
+ HighlightComponent hl = (HighlightComponent) searchComponents.get(HighlightComponent.COMPONENT_NAME);
+ return hl==null? null: hl.getHighlighter();
}
/**
@@ -838,10 +822,20 @@ public final class SolrCore implements SolrInfoMBean {
{
Map<String, SearchComponent> components = new HashMap<String, SearchComponent>();
initPlugins(components,SearchComponent.class);
+ for (Map.Entry<String, SearchComponent> e : components.entrySet()) {
+ SearchComponent c = e.getValue();
+ if (c instanceof HighlightComponent) {
+ HighlightComponent hl = (HighlightComponent) c;
+ if(!HighlightComponent.COMPONENT_NAME.equals(e.getKey())){
+ components.put(HighlightComponent.COMPONENT_NAME,hl);
+ }
+ break;
+ }
+ }
+ addIfNotPresent(components,HighlightComponent.COMPONENT_NAME,HighlightComponent.class);
addIfNotPresent(components,QueryComponent.COMPONENT_NAME,QueryComponent.class);
addIfNotPresent(components,FacetComponent.COMPONENT_NAME,FacetComponent.class);
addIfNotPresent(components,MoreLikeThisComponent.COMPONENT_NAME,MoreLikeThisComponent.class);
- addIfNotPresent(components,HighlightComponent.COMPONENT_NAME,HighlightComponent.class);
addIfNotPresent(components,StatsComponent.COMPONENT_NAME,StatsComponent.class);
addIfNotPresent(components,DebugComponent.COMPONENT_NAME,DebugComponent.class);
return components;
diff --git a/src/java/org/apache/solr/handler/component/HighlightComponent.java b/src/java/org/apache/solr/handler/component/HighlightComponent.java
index 5e7fa99237b..d6168aa5823 100644
--- a/src/java/org/apache/solr/handler/component/HighlightComponent.java
+++ b/src/java/org/apache/solr/handler/component/HighlightComponent.java
@@ -25,12 +25,18 @@ import org.apache.solr.common.params.SolrParams;
import org.apache.solr.common.util.NamedList;
import org.apache.solr.common.util.SimpleOrderedMap;
import org.apache.solr.highlight.SolrHighlighter;
+import org.apache.solr.highlight.DefaultSolrHighlighter;
import org.apache.solr.request.SolrQueryRequest;
+import org.apache.solr.util.plugin.PluginInfoInitialized;
+import org.apache.solr.util.plugin.SolrCoreAware;
+import org.apache.solr.core.PluginInfo;
+import org.apache.solr.core.SolrCore;
import java.io.IOException;
import java.net.URL;
-import java.util.Arrays;
import java.util.Map;
+import java.util.List;
+import java.util.Collections;
/**
* TODO!
@@ -38,22 +44,44 @@ import java.util.Map;
* @version $Id$
* @since solr 1.3
*/
-public class HighlightComponent extends SearchComponent
+public class HighlightComponent extends SearchComponent implements PluginInfoInitialized, SolrCoreAware
{
public static final String COMPONENT_NAME = "highlight";
-
+ private PluginInfo info = PluginInfo.EMPTY_INFO;
+ private SolrHighlighter highlighter;
+
+
+ public void init(PluginInfo info) {
+ this.info = info;
+ }
+
@Override
- public void prepare(ResponseBuilder rb) throws IOException
- {
- SolrHighlighter highlighter = rb.req.getCore().getHighlighter();
+ public void prepare(ResponseBuilder rb) throws IOException {
rb.doHighlights = highlighter.isHighlightingEnabled(rb.req.getParams());
}
-
+
+ public void inform(SolrCore core) {
+ List<PluginInfo> children = info.getChildren("highlighting");
+ if(children.isEmpty()) {
+ PluginInfo pluginInfo = core.getSolrConfig().getPluginInfo(SolrHighlighter.class.getName()); //TODO deprecated configuration remove later
+ if (pluginInfo != null) {
+ highlighter = core.createInitInstance(pluginInfo, SolrHighlighter.class, null, DefaultSolrHighlighter.class.getName());
+ highlighter.initalize(core.getSolrConfig());
+ } else {
+ DefaultSolrHighlighter defHighlighter = new DefaultSolrHighlighter(core);
+ defHighlighter.init(PluginInfo.EMPTY_INFO);
+ highlighter = defHighlighter;
+ }
+ } else {
+ highlighter = core.createInitInstance(children.get(0),SolrHighlighter.class,null, DefaultSolrHighlighter.class.getName());
+ }
+
+ }
+
@Override
public void process(ResponseBuilder rb) throws IOException {
SolrQueryRequest req = rb.req;
if (rb.doHighlights) {
- SolrHighlighter highlighter = req.getCore().getHighlighter();
SolrParams params = req.getParams();
String[] defaultHighlightFields; //TODO: get from builder by default?
@@ -158,6 +186,9 @@ public class HighlightComponent extends SearchComponent
return nl;
}
+ public SolrHighlighter getHighlighter() {
+ return highlighter;
+ }
////////////////////////////////////////////
/// SolrInfoMBean
////////////////////////////////////////////
diff --git a/src/test/test-files/solr/conf/solrconfig-SOLR-749.xml b/src/test/test-files/solr/conf/solrconfig-SOLR-749.xml
index 3ab849cf64d..69f1721fad9 100644
--- a/src/test/test-files/solr/conf/solrconfig-SOLR-749.xml
+++ b/src/test/test-files/solr/conf/solrconfig-SOLR-749.xml
@@ -353,7 +353,7 @@
<str>spellcheck</str>
</arr>
</requestHandler>
-
+ <searchComponent class="solr.HighlightComponent" name="highlight">
<highlighting>
<!-- Configure the standard fragmenter -->
<fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
@@ -376,6 +376,7 @@
</lst>
</formatter>
</highlighting>
+ </searchComponent>
<!-- enable streaming for testing... -->
diff --git a/src/test/test-files/solr/conf/solrconfig-altdirectory.xml b/src/test/test-files/solr/conf/solrconfig-altdirectory.xml
index 80113b93dbb..5a91e46ff8a 100755
--- a/src/test/test-files/solr/conf/solrconfig-altdirectory.xml
+++ b/src/test/test-files/solr/conf/solrconfig-altdirectory.xml
@@ -362,6 +362,7 @@
</arr>
</requestHandler>
+ <searchComponent class="solr.HighlightComponent" name="highlight">
<highlighting>
<!-- Configure the standard fragmenter -->
<fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
@@ -384,6 +385,7 @@
</lst>
</formatter>
</highlighting>
+ </searchComponent>
<!-- enable streaming for testing... -->
diff --git a/src/test/test-files/solr/conf/solrconfig-delpolicy1.xml b/src/test/test-files/solr/conf/solrconfig-delpolicy1.xml
index 23d0499c7df..195c811f11c 100644
--- a/src/test/test-files/solr/conf/solrconfig-delpolicy1.xml
+++ b/src/test/test-files/solr/conf/solrconfig-delpolicy1.xml
@@ -378,6 +378,7 @@
</arr>
</requestHandler>
+ <searchComponent class="solr.HighlightComponent" name="highlight">
<highlighting>
<!-- Configure the standard fragmenter -->
<fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
@@ -400,7 +401,7 @@
</lst>
</formatter>
</highlighting>
-
+ </searchComponent>
<!-- enable streaming for testing... -->
<requestDispatcher handleSelect="true" >
diff --git a/src/test/test-files/solr/conf/solrconfig-delpolicy2.xml b/src/test/test-files/solr/conf/solrconfig-delpolicy2.xml
index ca5ab478909..099fdb4804a 100644
--- a/src/test/test-files/solr/conf/solrconfig-delpolicy2.xml
+++ b/src/test/test-files/solr/conf/solrconfig-delpolicy2.xml
@@ -375,6 +375,7 @@
</arr>
</requestHandler>
+ <searchComponent class="solr.HighlightComponent" name="highlight">
<highlighting>
<!-- Configure the standard fragmenter -->
<fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
@@ -397,6 +398,7 @@
</lst>
</formatter>
</highlighting>
+ </searchComponent>
<!-- enable streaming for testing... -->
diff --git a/src/test/test-files/solr/conf/solrconfig-duh-optimize.xml b/src/test/test-files/solr/conf/solrconfig-duh-optimize.xml
index 5d9ceb447e2..f88485ab57b 100644
--- a/src/test/test-files/solr/conf/solrconfig-duh-optimize.xml
+++ b/src/test/test-files/solr/conf/solrconfig-duh-optimize.xml
@@ -365,6 +365,7 @@
</arr>
</requestHandler>
+ <searchComponent class="solr.HighlightComponent" name="highlight">
<highlighting>
<!-- Configure the standard fragmenter -->
<fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
@@ -387,6 +388,7 @@
</lst>
</formatter>
</highlighting>
+ </searchComponent>
<!-- enable streaming for testing... -->
diff --git a/src/test/test-files/solr/conf/solrconfig-facet-sort.xml b/src/test/test-files/solr/conf/solrconfig-facet-sort.xml
index 460db3f2dde..f26d5175189 100755
--- a/src/test/test-files/solr/conf/solrconfig-facet-sort.xml
+++ b/src/test/test-files/solr/conf/solrconfig-facet-sort.xml
@@ -357,6 +357,7 @@
</arr>
</requestHandler>
+ <searchComponent class="solr.HighlightComponent" name="highlight">
<highlighting>
<!-- Configure the standard fragmenter -->
<fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
@@ -379,7 +380,7 @@
</lst>
</formatter>
</highlighting>
-
+ </searchComponent>
<!-- enable streaming for testing... -->
<requestDispatcher handleSelect="true" >
diff --git a/src/test/test-files/solr/conf/solrconfig-functionquery.xml b/src/test/test-files/solr/conf/solrconfig-functionquery.xml
index 7fcf87c1a87..9950434dc8e 100755
--- a/src/test/test-files/solr/conf/solrconfig-functionquery.xml
+++ b/src/test/test-files/solr/conf/solrconfig-functionquery.xml
@@ -266,6 +266,7 @@
<requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
<requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy" />
+ <searchComponent class="solr.HighlightComponent" name="highlight">
<highlighting>
<!-- Configure the standard fragmenter -->
<fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
@@ -288,7 +289,7 @@
</lst>
</formatter>
</highlighting>
-
+ </searchComponent>
<!-- enable streaming for testing... -->
<requestDispatcher handleSelect="true" >
diff --git a/src/test/test-files/solr/conf/solrconfig-highlight.xml b/src/test/test-files/solr/conf/solrconfig-highlight.xml
index d125b98c45a..65582e98415 100644
--- a/src/test/test-files/solr/conf/solrconfig-highlight.xml
+++ b/src/test/test-files/solr/conf/solrconfig-highlight.xml
@@ -301,29 +301,30 @@
<requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
<requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy" />
-
- <highlighting class="org.apache.solr.highlight.DummyHighlighter">
- <!-- Configure the standard fragmenter -->
- <fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
- <lst name="defaults">
- <int name="hl.fragsize">100</int>
- </lst>
- </fragmenter>
-
- <fragmenter name="regex" class="org.apache.solr.highlight.RegexFragmenter">
- <lst name="defaults">
- <int name="hl.fragsize">70</int>
- </lst>
- </fragmenter>
-
- <!-- Configure the standard formatter -->
- <formatter name="html" class="org.apache.solr.highlight.HtmlFormatter" default="true">
- <lst name="defaults">
- <str name="hl.simple.pre"><![CDATA[<em>]]></str>
- <str name="hl.simple.post"><![CDATA[</em>]]></str>
- </lst>
- </formatter>
- </highlighting>
+ <searchComponent class="solr.HighlightComponent" name="highlight">
+ <highlighting class="org.apache.solr.highlight.DummyHighlighter">
+ <!-- Configure the standard fragmenter -->
+ <fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
+ <lst name="defaults">
+ <int name="hl.fragsize">100</int>
+ </lst>
+ </fragmenter>
+
+ <fragmenter name="regex" class="org.apache.solr.highlight.RegexFragmenter">
+ <lst name="defaults">
+ <int name="hl.fragsize">70</int>
+ </lst>
+ </fragmenter>
+
+ <!-- Configure the standard formatter -->
+ <formatter name="html" class="org.apache.solr.highlight.HtmlFormatter" default="true">
+ <lst name="defaults">
+ <str name="hl.simple.pre"><![CDATA[<em>]]></str>
+ <str name="hl.simple.post"><![CDATA[</em>]]></str>
+ </lst>
+ </formatter>
+ </highlighting>
+ </searchComponent>
<!-- enable streaming for testing... -->
diff --git a/src/test/test-files/solr/conf/solrconfig-legacy.xml b/src/test/test-files/solr/conf/solrconfig-legacy.xml
index 13245d23ac2..5f21a64973f 100644
--- a/src/test/test-files/solr/conf/solrconfig-legacy.xml
+++ b/src/test/test-files/solr/conf/solrconfig-legacy.xml
@@ -397,6 +397,7 @@
</arr>
</requestHandler>
+ <searchComponent class="solr.HighlightComponent" name="highlight">
<highlighting>
<!-- Configure the standard fragmenter -->
<fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
@@ -419,6 +420,7 @@
</lst>
</formatter>
</highlighting>
+ </searchComponent>
<!-- enable streaming for testing... -->
diff --git a/src/test/test-files/solr/conf/solrconfig-nocache.xml b/src/test/test-files/solr/conf/solrconfig-nocache.xml
index 3c9fad6916d..f7538e59f62 100644
--- a/src/test/test-files/solr/conf/solrconfig-nocache.xml
+++ b/src/test/test-files/solr/conf/solrconfig-nocache.xml
@@ -266,6 +266,7 @@
<requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
<requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy" />
+ <searchComponent class="solr.HighlightComponent" name="highlight">
<highlighting>
<!-- Configure the standard fragmenter -->
<fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
@@ -288,7 +289,7 @@
</lst>
</formatter>
</highlighting>
-
+ </searchComponent>
<!-- enable streaming for testing... -->
<requestDispatcher handleSelect="true" >
diff --git a/src/test/test-files/solr/conf/solrconfig-propinject-indexdefault.xml b/src/test/test-files/solr/conf/solrconfig-propinject-indexdefault.xml
index 18154a0bdb4..24db6d6ccf0 100644
--- a/src/test/test-files/solr/conf/solrconfig-propinject-indexdefault.xml
+++ b/src/test/test-files/solr/conf/solrconfig-propinject-indexdefault.xml
@@ -407,6 +407,7 @@
</arr>
</requestHandler>
+ <searchComponent class="solr.HighlightComponent" name="highlight">
<highlighting>
<!-- Configure the standard fragmenter -->
<fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
@@ -429,7 +430,7 @@
</lst>
</formatter>
</highlighting>
-
+ </searchComponent>
<!-- enable streaming for testing... -->
<requestDispatcher handleSelect="true" >
diff --git a/src/test/test-files/solr/conf/solrconfig-propinject.xml b/src/test/test-files/solr/conf/solrconfig-propinject.xml
index 7ce61e6b4f7..36a34fcfd20 100644
--- a/src/test/test-files/solr/conf/solrconfig-propinject.xml
+++ b/src/test/test-files/solr/conf/solrconfig-propinject.xml
@@ -407,6 +407,7 @@
</arr>
</requestHandler>
+ <searchComponent class="solr.HighlightComponent" name="highlight">
<highlighting>
<!-- Configure the standard fragmenter -->
<fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
@@ -429,6 +430,7 @@
</lst>
</formatter>
</highlighting>
+ </searchComponent>
<!-- enable streaming for testing... -->
diff --git a/src/test/test-files/solr/conf/solrconfig-termindex.xml b/src/test/test-files/solr/conf/solrconfig-termindex.xml
index b7eb6144574..5e96fac2a38 100644
--- a/src/test/test-files/solr/conf/solrconfig-termindex.xml
+++ b/src/test/test-files/solr/conf/solrconfig-termindex.xml
@@ -394,6 +394,7 @@
</arr>
</requestHandler>
+ <searchComponent class="solr.HighlightComponent" name="highlight">
<highlighting>
<!-- Configure the standard fragmenter -->
<fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
@@ -416,6 +417,7 @@
</lst>
</formatter>
</highlighting>
+ </searchComponent>
<!-- enable streaming for testing... -->
diff --git a/src/test/test-files/solr/conf/solrconfig-xinclude.xml b/src/test/test-files/solr/conf/solrconfig-xinclude.xml
index 11f3a1fa484..3b727b994aa 100644
--- a/src/test/test-files/solr/conf/solrconfig-xinclude.xml
+++ b/src/test/test-files/solr/conf/solrconfig-xinclude.xml
@@ -371,6 +371,7 @@
</arr>
</requestHandler>
+ <searchComponent class="solr.HighlightComponent" name="highlight">
<highlighting>
<!-- Configure the standard fragmenter -->
<fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
@@ -393,6 +394,7 @@
</lst>
</formatter>
</highlighting>
+ </searchComponent>
<!-- enable streaming for testing... -->
diff --git a/src/test/test-files/solr/conf/solrconfig.xml b/src/test/test-files/solr/conf/solrconfig.xml
index a29693666e5..7fb4fe375e6 100644
--- a/src/test/test-files/solr/conf/solrconfig.xml
+++ b/src/test/test-files/solr/conf/solrconfig.xml
@@ -396,7 +396,7 @@
<str>tvComponent</str>
</arr>
</requestHandler>
-
+ <searchComponent class="solr.HighlightComponent" name="highlight">
<highlighting>
<!-- Configure the standard fragmenter -->
<fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
@@ -427,6 +427,7 @@
<fragmentsBuilder name="scoreOrder" class="org.apache.solr.highlight.ScoreOrderFragmentsBuilder" default="true"/>
</highlighting>
+ </searchComponent>
<!-- enable streaming for testing... -->
diff --git a/src/test/test-files/solr/conf/solrconfig_perf.xml b/src/test/test-files/solr/conf/solrconfig_perf.xml
index 4e8eba885a2..02a19e785ae 100755
--- a/src/test/test-files/solr/conf/solrconfig_perf.xml
+++ b/src/test/test-files/solr/conf/solrconfig_perf.xml
@@ -763,6 +763,7 @@
</lst>
</requestHandler>
+ <searchComponent class="solr.HighlightComponent" name="highlight">
<highlighting>
<!-- Configure the standard fragmenter -->
<!-- This could most likely be commented out in the "default" case -->
@@ -792,7 +793,7 @@
</lst>
</formatter>
</highlighting>
-
+ </searchComponent>
<!-- An example dedup update processor that creates the "id" field on the fly
based on the hash code of some other fields. This example has overwriteDupes
set to false since we are using the id field as the signatureField and Solr