You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by no...@apache.org on 2010/01/15 10:43:50 UTC

svn commit: r899572 - in /lucene/solr/trunk: ./ example/solr/conf/ src/java/org/apache/solr/core/ src/java/org/apache/solr/handler/component/ src/test/test-files/solr/conf/

Author: noble
Date: Fri Jan 15 09:43:50 2010
New Revision: 899572

URL: http://svn.apache.org/viewvc?rev=899572&view=rev
Log:
SOLR-1696 : Deprecate old <highlighting> syntax and move configuration to HighlightComponent

Modified:
    lucene/solr/trunk/CHANGES.txt
    lucene/solr/trunk/example/solr/conf/solrconfig.xml
    lucene/solr/trunk/src/java/org/apache/solr/core/PluginInfo.java
    lucene/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java
    lucene/solr/trunk/src/java/org/apache/solr/core/SolrCore.java
    lucene/solr/trunk/src/java/org/apache/solr/handler/component/HighlightComponent.java
    lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-SOLR-749.xml
    lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-altdirectory.xml
    lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-delpolicy1.xml
    lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-delpolicy2.xml
    lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-duh-optimize.xml
    lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-facet-sort.xml
    lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-functionquery.xml
    lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-highlight.xml
    lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-legacy.xml
    lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-nocache.xml
    lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-propinject-indexdefault.xml
    lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-propinject.xml
    lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-termindex.xml
    lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-xinclude.xml
    lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig.xml
    lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig_perf.xml

Modified: lucene/solr/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/CHANGES.txt?rev=899572&r1=899571&r2=899572&view=diff
==============================================================================
--- lucene/solr/trunk/CHANGES.txt (original)
+++ lucene/solr/trunk/CHANGES.txt Fri Jan 15 09:43:50 2010
@@ -28,6 +28,8 @@
 
 * 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 @@
 * 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
 ----------------------
 

Modified: lucene/solr/trunk/example/solr/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/example/solr/conf/solrconfig.xml?rev=899572&r1=899571&r2=899572&view=diff
==============================================================================
--- lucene/solr/trunk/example/solr/conf/solrconfig.xml (original)
+++ lucene/solr/trunk/example/solr/conf/solrconfig.xml Fri Jan 15 09:43:50 2010
@@ -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

Modified: lucene/solr/trunk/src/java/org/apache/solr/core/PluginInfo.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/core/PluginInfo.java?rev=899572&r1=899571&r2=899572&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/core/PluginInfo.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/core/PluginInfo.java Fri Jan 15 09:43:50 2010
@@ -103,5 +103,6 @@
     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"));
 }

Modified: lucene/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java?rev=899572&r1=899571&r2=899572&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java Fri Jan 15 09:43:50 2010
@@ -193,7 +193,12 @@
      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);

Modified: lucene/solr/trunk/src/java/org/apache/solr/core/SolrCore.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/core/SolrCore.java?rev=899572&r1=899571&r2=899572&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/core/SolrCore.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/core/SolrCore.java Fri Jan 15 09:43:50 2010
@@ -96,7 +96,6 @@
   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 @@
     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 @@
     reqHandlers = new RequestHandlers(this);
     reqHandlers.initHandlersFromConfig( solrConfig );
 
-    highlighter = initHighlighter();
 
     // Handle things that should eventually go away
     initDeprecatedSupport();
@@ -615,19 +610,6 @@
     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 @@
   /**
    * 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 @@
   {
     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;

Modified: lucene/solr/trunk/src/java/org/apache/solr/handler/component/HighlightComponent.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/handler/component/HighlightComponent.java?rev=899572&r1=899571&r2=899572&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/handler/component/HighlightComponent.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/handler/component/HighlightComponent.java Fri Jan 15 09:43:50 2010
@@ -25,12 +25,18 @@
 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 @@
  * @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 @@
     return nl;
   }
 
+  public SolrHighlighter getHighlighter() {
+    return highlighter;
+  }
   ////////////////////////////////////////////
   ///  SolrInfoMBean
   ////////////////////////////////////////////

Modified: lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-SOLR-749.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-SOLR-749.xml?rev=899572&r1=899571&r2=899572&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-SOLR-749.xml (original)
+++ lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-SOLR-749.xml Fri Jan 15 09:43:50 2010
@@ -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... -->

Modified: lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-altdirectory.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-altdirectory.xml?rev=899572&r1=899571&r2=899572&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-altdirectory.xml (original)
+++ lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-altdirectory.xml Fri Jan 15 09:43:50 2010
@@ -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... -->

Modified: lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-delpolicy1.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-delpolicy1.xml?rev=899572&r1=899571&r2=899572&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-delpolicy1.xml (original)
+++ lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-delpolicy1.xml Fri Jan 15 09:43:50 2010
@@ -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" >

Modified: lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-delpolicy2.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-delpolicy2.xml?rev=899572&r1=899571&r2=899572&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-delpolicy2.xml (original)
+++ lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-delpolicy2.xml Fri Jan 15 09:43:50 2010
@@ -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... -->

Modified: lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-duh-optimize.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-duh-optimize.xml?rev=899572&r1=899571&r2=899572&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-duh-optimize.xml (original)
+++ lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-duh-optimize.xml Fri Jan 15 09:43:50 2010
@@ -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... -->

Modified: lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-facet-sort.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-facet-sort.xml?rev=899572&r1=899571&r2=899572&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-facet-sort.xml (original)
+++ lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-facet-sort.xml Fri Jan 15 09:43:50 2010
@@ -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" >

Modified: lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-functionquery.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-functionquery.xml?rev=899572&r1=899571&r2=899572&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-functionquery.xml (original)
+++ lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-functionquery.xml Fri Jan 15 09:43:50 2010
@@ -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" >

Modified: lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-highlight.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-highlight.xml?rev=899572&r1=899571&r2=899572&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-highlight.xml (original)
+++ lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-highlight.xml Fri Jan 15 09:43:50 2010
@@ -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... -->

Modified: lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-legacy.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-legacy.xml?rev=899572&r1=899571&r2=899572&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-legacy.xml (original)
+++ lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-legacy.xml Fri Jan 15 09:43:50 2010
@@ -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... -->

Modified: lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-nocache.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-nocache.xml?rev=899572&r1=899571&r2=899572&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-nocache.xml (original)
+++ lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-nocache.xml Fri Jan 15 09:43:50 2010
@@ -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" >

Modified: lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-propinject-indexdefault.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-propinject-indexdefault.xml?rev=899572&r1=899571&r2=899572&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-propinject-indexdefault.xml (original)
+++ lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-propinject-indexdefault.xml Fri Jan 15 09:43:50 2010
@@ -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" >

Modified: lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-propinject.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-propinject.xml?rev=899572&r1=899571&r2=899572&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-propinject.xml (original)
+++ lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-propinject.xml Fri Jan 15 09:43:50 2010
@@ -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... -->

Modified: lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-termindex.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-termindex.xml?rev=899572&r1=899571&r2=899572&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-termindex.xml (original)
+++ lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-termindex.xml Fri Jan 15 09:43:50 2010
@@ -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... -->

Modified: lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-xinclude.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-xinclude.xml?rev=899572&r1=899571&r2=899572&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-xinclude.xml (original)
+++ lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-xinclude.xml Fri Jan 15 09:43:50 2010
@@ -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... -->

Modified: lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig.xml?rev=899572&r1=899571&r2=899572&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig.xml (original)
+++ lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig.xml Fri Jan 15 09:43:50 2010
@@ -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... -->

Modified: lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig_perf.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig_perf.xml?rev=899572&r1=899571&r2=899572&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig_perf.xml (original)
+++ lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig_perf.xml Fri Jan 15 09:43:50 2010
@@ -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