lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r902820 - in /lucene/solr/branches/cloud: ./ contrib/dataimporthandler/ contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/ example/solr/conf/ lib/ site/ site/images/ src/java/org/apache/solr/core/ src/java/org/apach...
Date Mon, 25 Jan 2010 14:30:18 GMT
Author: markrmiller
Date: Mon Jan 25 14:30:17 2010
New Revision: 902820

URL: http://svn.apache.org/viewvc?rev=902820&view=rev
Log:
merge cloud branch up to r902484

Added:
    lucene/solr/branches/cloud/site/images/lucidworks_reference_guide.png
      - copied unchanged from r902484, lucene/solr/trunk/site/images/lucidworks_reference_guide.png
    lucene/solr/branches/cloud/src/site/src/documentation/content/xdocs/images/lucidworks_reference_guide.png
      - copied unchanged from r902484, lucene/solr/trunk/src/site/src/documentation/content/xdocs/images/lucidworks_reference_guide.png
Modified:
    lucene/solr/branches/cloud/   (props changed)
    lucene/solr/branches/cloud/CHANGES.txt
    lucene/solr/branches/cloud/contrib/dataimporthandler/CHANGES.txt
    lucene/solr/branches/cloud/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImportHandler.java
    lucene/solr/branches/cloud/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImporter.java
    lucene/solr/branches/cloud/example/solr/conf/solrconfig.xml
    lucene/solr/branches/cloud/lib/lucene-analyzers-2.9.1-dev.jar
    lucene/solr/branches/cloud/lib/lucene-collation-2.9.1-dev.jar
    lucene/solr/branches/cloud/lib/lucene-core-2.9.1-dev.jar
    lucene/solr/branches/cloud/lib/lucene-fast-vector-highlighter-2.9.1-dev.jar
    lucene/solr/branches/cloud/lib/lucene-highlighter-2.9.1-dev.jar
    lucene/solr/branches/cloud/lib/lucene-memory-2.9.1-dev.jar
    lucene/solr/branches/cloud/lib/lucene-misc-2.9.1-dev.jar
    lucene/solr/branches/cloud/lib/lucene-queries-2.9.1-dev.jar
    lucene/solr/branches/cloud/lib/lucene-snowball-2.9.1-dev.jar
    lucene/solr/branches/cloud/lib/lucene-spatial-2.9.1-dev.jar
    lucene/solr/branches/cloud/lib/lucene-spellchecker-2.9.1-dev.jar
    lucene/solr/branches/cloud/site/features.html
    lucene/solr/branches/cloud/site/index.html
    lucene/solr/branches/cloud/site/issue_tracking.html
    lucene/solr/branches/cloud/site/linkmap.html
    lucene/solr/branches/cloud/site/mailing_lists.html
    lucene/solr/branches/cloud/site/tutorial.html
    lucene/solr/branches/cloud/site/version_control.html
    lucene/solr/branches/cloud/site/who.html
    lucene/solr/branches/cloud/src/java/org/apache/solr/core/PluginInfo.java
    lucene/solr/branches/cloud/src/java/org/apache/solr/core/SolrConfig.java
    lucene/solr/branches/cloud/src/java/org/apache/solr/core/SolrCore.java
    lucene/solr/branches/cloud/src/java/org/apache/solr/handler/component/HighlightComponent.java
    lucene/solr/branches/cloud/src/java/org/apache/solr/highlight/SolrHighlighter.java
    lucene/solr/branches/cloud/src/java/org/apache/solr/search/ExtendedDismaxQParserPlugin.java
    lucene/solr/branches/cloud/src/site/src/documentation/skinconf.xml
    lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-SOLR-749.xml
    lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-altdirectory.xml
    lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-delpolicy1.xml
    lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-delpolicy2.xml
    lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-duh-optimize.xml
    lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-facet-sort.xml
    lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-functionquery.xml
    lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-highlight.xml
    lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-legacy.xml
    lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-nocache.xml
    lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-propinject-indexdefault.xml
    lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-propinject.xml
    lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-termindex.xml
    lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-xinclude.xml
    lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig.xml
    lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig_perf.xml

Propchange: lucene/solr/branches/cloud/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jan 25 14:30:17 2010
@@ -1 +1 @@
-/lucene/solr/trunk:888480-898363
+/lucene/solr/trunk:888480-902484

Modified: lucene/solr/branches/cloud/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/CHANGES.txt?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/CHANGES.txt (original)
+++ lucene/solr/branches/cloud/CHANGES.txt Mon Jan 25 14:30:17 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
 ---------------------
@@ -197,12 +199,16 @@
 * SOLR-1268: Add Lucene 2.9-dev r888785 FastVectorHighlighter contrib jar to lib. (koji)
 
 * SOLR-1538: Reordering of object allocations in ConcurrentLRUCache to eliminate
-  (an extremeely small) potential for deadlock.
+  (an extremely small) potential for deadlock.
   (gabriele renzi via hossman)
   
 * 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)
+
+* Upgraded to Lucene 2.9-dev r900226 (koji)
+  
 Build
 ----------------------
 

Modified: lucene/solr/branches/cloud/contrib/dataimporthandler/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/contrib/dataimporthandler/CHANGES.txt?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/contrib/dataimporthandler/CHANGES.txt (original)
+++ lucene/solr/branches/cloud/contrib/dataimporthandler/CHANGES.txt Mon Jan 25 14:30:17 2010
@@ -37,6 +37,7 @@
 
 * SOLR-1352 : Multi-threaded implementation of DIH (noble)
 
+* SOLR-1721 : Add explicit option to run DataImportHandler in synchronous mode (Alexey Serba via noble)
 
 Optimizations
 ----------------------

Modified: lucene/solr/branches/cloud/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImportHandler.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImportHandler.java?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImportHandler.java (original)
+++ lucene/solr/branches/cloud/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImportHandler.java Mon Jan 25 14:30:17 2010
@@ -211,7 +211,7 @@
           }
         } else {
           // Asynchronous request for normal mode
-          if(requestParams.contentStream == null){
+          if(requestParams.contentStream == null && !requestParams.syncMode){
             importer.runAsync(requestParams, sw);
           } else {
               importer.runCmd(requestParams, sw);

Modified: lucene/solr/branches/cloud/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImporter.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImporter.java?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImporter.java (original)
+++ lucene/solr/branches/cloud/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImporter.java Mon Jan 25 14:30:17 2010
@@ -470,6 +470,8 @@
 
     public boolean verbose = false;
 
+    public boolean syncMode = false;
+
     public boolean commit = true;
 
     public boolean optimize = true;
@@ -504,6 +506,7 @@
         verbose = "true".equals(requestParams.get("verbose"))
                 || "on".equals(requestParams.get("verbose"));
       }
+      syncMode = "true".equals(requestParams.get("synchronous"));
       if (DELTA_IMPORT_CMD.equals(command) || IMPORT_CMD.equals(command)) {
         clean = false;
       }

Modified: lucene/solr/branches/cloud/example/solr/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/example/solr/conf/solrconfig.xml?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/example/solr/conf/solrconfig.xml (original)
+++ lucene/solr/branches/cloud/example/solr/conf/solrconfig.xml Mon Jan 25 14:30:17 2010
@@ -130,7 +130,8 @@
       single = SingleInstanceLockFactory - suggested for a read-only index
                or when there is no possibility of another process trying
                to modify the index.
-      native = NativeFSLockFactory  - uses OS native file locking
+      native = NativeFSLockFactory  - uses OS native file locking.
+               Do not use with multiple solr webapps in the same JVM.
       simple = SimpleFSLockFactory  - uses a plain file for locking
 
       (For backwards compatibility with Solr 1.2, 'simple' is the default
@@ -928,7 +929,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 +965,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/branches/cloud/lib/lucene-analyzers-2.9.1-dev.jar
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/lib/lucene-analyzers-2.9.1-dev.jar?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/solr/branches/cloud/lib/lucene-collation-2.9.1-dev.jar
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/lib/lucene-collation-2.9.1-dev.jar?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/solr/branches/cloud/lib/lucene-core-2.9.1-dev.jar
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/lib/lucene-core-2.9.1-dev.jar?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/solr/branches/cloud/lib/lucene-fast-vector-highlighter-2.9.1-dev.jar
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/lib/lucene-fast-vector-highlighter-2.9.1-dev.jar?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/solr/branches/cloud/lib/lucene-highlighter-2.9.1-dev.jar
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/lib/lucene-highlighter-2.9.1-dev.jar?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/solr/branches/cloud/lib/lucene-memory-2.9.1-dev.jar
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/lib/lucene-memory-2.9.1-dev.jar?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/solr/branches/cloud/lib/lucene-misc-2.9.1-dev.jar
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/lib/lucene-misc-2.9.1-dev.jar?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/solr/branches/cloud/lib/lucene-queries-2.9.1-dev.jar
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/lib/lucene-queries-2.9.1-dev.jar?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/solr/branches/cloud/lib/lucene-snowball-2.9.1-dev.jar
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/lib/lucene-snowball-2.9.1-dev.jar?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/solr/branches/cloud/lib/lucene-spatial-2.9.1-dev.jar
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/lib/lucene-spatial-2.9.1-dev.jar?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/solr/branches/cloud/lib/lucene-spellchecker-2.9.1-dev.jar
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/lib/lucene-spellchecker-2.9.1-dev.jar?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/solr/branches/cloud/site/features.html
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/site/features.html?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/site/features.html (original)
+++ lucene/solr/branches/cloud/site/features.html Mon Jan 25 14:30:17 2010
@@ -162,7 +162,7 @@
   |alternative credits
   +-->
 <div id="credit2">
-<a href="http://www.packtpub.com/solr-1-4-enterprise-search-server?utm_source=http%3A%2F%2Flucene.apache.org%2Fsolr%2F&utm_medium=spons&utm_content=pod&utm_campaign=mdb_000275"><img border="0" title="Book: Solr 1.4 Enterprise Search Server" alt="Book: Solr 1.4 Enterprise Search Server - logo" src="images/solr-book-image.jpg" style="width: 150px;height: 185px;"></a>
+<a href="http://www.packtpub.com/solr-1-4-enterprise-search-server?utm_source=http%3A%2F%2Flucene.apache.org%2Fsolr%2F&utm_medium=spons&utm_content=pod&utm_campaign=mdb_000275"><img border="0" title="Book: Solr 1.4 Enterprise Search Server" alt="Book: Solr 1.4 Enterprise Search Server - logo" src="images/solr-book-image.jpg" style="width: 150px;height: 185px;"></a><a href="http://www.lucidimagination.com/Downloads/LucidWorks-for-Solr/Reference-Guide?sc=AP"><img border="0" title="LucidWorks for Solr Certified Distribution Reference Guide" alt="LucidWorks for Solr Certified Distribution Reference Guide - logo" src="images/lucidworks_reference_guide.png" style="width: 150px;height: 185px;"></a>
 </div>
 </div>
 <!--+

Modified: lucene/solr/branches/cloud/site/index.html
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/site/index.html?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/site/index.html (original)
+++ lucene/solr/branches/cloud/site/index.html Mon Jan 25 14:30:17 2010
@@ -165,7 +165,7 @@
   |alternative credits
   +-->
 <div id="credit2">
-<a href="http://www.packtpub.com/solr-1-4-enterprise-search-server?utm_source=http%3A%2F%2Flucene.apache.org%2Fsolr%2F&utm_medium=spons&utm_content=pod&utm_campaign=mdb_000275"><img border="0" title="Book: Solr 1.4 Enterprise Search Server" alt="Book: Solr 1.4 Enterprise Search Server - logo" src="images/solr-book-image.jpg" style="width: 150px;height: 185px;"></a>
+<a href="http://www.packtpub.com/solr-1-4-enterprise-search-server?utm_source=http%3A%2F%2Flucene.apache.org%2Fsolr%2F&utm_medium=spons&utm_content=pod&utm_campaign=mdb_000275"><img border="0" title="Book: Solr 1.4 Enterprise Search Server" alt="Book: Solr 1.4 Enterprise Search Server - logo" src="images/solr-book-image.jpg" style="width: 150px;height: 185px;"></a><a href="http://www.lucidimagination.com/Downloads/LucidWorks-for-Solr/Reference-Guide?sc=AP"><img border="0" title="LucidWorks for Solr Certified Distribution Reference Guide" alt="LucidWorks for Solr Certified Distribution Reference Guide - logo" src="images/lucidworks_reference_guide.png" style="width: 150px;height: 185px;"></a>
 </div>
 </div>
 <!--+

Modified: lucene/solr/branches/cloud/site/issue_tracking.html
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/site/issue_tracking.html?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/site/issue_tracking.html (original)
+++ lucene/solr/branches/cloud/site/issue_tracking.html Mon Jan 25 14:30:17 2010
@@ -162,7 +162,7 @@
   |alternative credits
   +-->
 <div id="credit2">
-<a href="http://www.packtpub.com/solr-1-4-enterprise-search-server?utm_source=http%3A%2F%2Flucene.apache.org%2Fsolr%2F&utm_medium=spons&utm_content=pod&utm_campaign=mdb_000275"><img border="0" title="Book: Solr 1.4 Enterprise Search Server" alt="Book: Solr 1.4 Enterprise Search Server - logo" src="images/solr-book-image.jpg" style="width: 150px;height: 185px;"></a>
+<a href="http://www.packtpub.com/solr-1-4-enterprise-search-server?utm_source=http%3A%2F%2Flucene.apache.org%2Fsolr%2F&utm_medium=spons&utm_content=pod&utm_campaign=mdb_000275"><img border="0" title="Book: Solr 1.4 Enterprise Search Server" alt="Book: Solr 1.4 Enterprise Search Server - logo" src="images/solr-book-image.jpg" style="width: 150px;height: 185px;"></a><a href="http://www.lucidimagination.com/Downloads/LucidWorks-for-Solr/Reference-Guide?sc=AP"><img border="0" title="LucidWorks for Solr Certified Distribution Reference Guide" alt="LucidWorks for Solr Certified Distribution Reference Guide - logo" src="images/lucidworks_reference_guide.png" style="width: 150px;height: 185px;"></a>
 </div>
 </div>
 <!--+

Modified: lucene/solr/branches/cloud/site/linkmap.html
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/site/linkmap.html?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/site/linkmap.html (original)
+++ lucene/solr/branches/cloud/site/linkmap.html Mon Jan 25 14:30:17 2010
@@ -162,7 +162,7 @@
   |alternative credits
   +-->
 <div id="credit2">
-<a href="http://www.packtpub.com/solr-1-4-enterprise-search-server?utm_source=http%3A%2F%2Flucene.apache.org%2Fsolr%2F&utm_medium=spons&utm_content=pod&utm_campaign=mdb_000275"><img border="0" title="Book: Solr 1.4 Enterprise Search Server" alt="Book: Solr 1.4 Enterprise Search Server - logo" src="images/solr-book-image.jpg" style="width: 150px;height: 185px;"></a>
+<a href="http://www.packtpub.com/solr-1-4-enterprise-search-server?utm_source=http%3A%2F%2Flucene.apache.org%2Fsolr%2F&utm_medium=spons&utm_content=pod&utm_campaign=mdb_000275"><img border="0" title="Book: Solr 1.4 Enterprise Search Server" alt="Book: Solr 1.4 Enterprise Search Server - logo" src="images/solr-book-image.jpg" style="width: 150px;height: 185px;"></a><a href="http://www.lucidimagination.com/Downloads/LucidWorks-for-Solr/Reference-Guide?sc=AP"><img border="0" title="LucidWorks for Solr Certified Distribution Reference Guide" alt="LucidWorks for Solr Certified Distribution Reference Guide - logo" src="images/lucidworks_reference_guide.png" style="width: 150px;height: 185px;"></a>
 </div>
 </div>
 <!--+

Modified: lucene/solr/branches/cloud/site/mailing_lists.html
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/site/mailing_lists.html?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/site/mailing_lists.html (original)
+++ lucene/solr/branches/cloud/site/mailing_lists.html Mon Jan 25 14:30:17 2010
@@ -162,7 +162,7 @@
   |alternative credits
   +-->
 <div id="credit2">
-<a href="http://www.packtpub.com/solr-1-4-enterprise-search-server?utm_source=http%3A%2F%2Flucene.apache.org%2Fsolr%2F&utm_medium=spons&utm_content=pod&utm_campaign=mdb_000275"><img border="0" title="Book: Solr 1.4 Enterprise Search Server" alt="Book: Solr 1.4 Enterprise Search Server - logo" src="images/solr-book-image.jpg" style="width: 150px;height: 185px;"></a>
+<a href="http://www.packtpub.com/solr-1-4-enterprise-search-server?utm_source=http%3A%2F%2Flucene.apache.org%2Fsolr%2F&utm_medium=spons&utm_content=pod&utm_campaign=mdb_000275"><img border="0" title="Book: Solr 1.4 Enterprise Search Server" alt="Book: Solr 1.4 Enterprise Search Server - logo" src="images/solr-book-image.jpg" style="width: 150px;height: 185px;"></a><a href="http://www.lucidimagination.com/Downloads/LucidWorks-for-Solr/Reference-Guide?sc=AP"><img border="0" title="LucidWorks for Solr Certified Distribution Reference Guide" alt="LucidWorks for Solr Certified Distribution Reference Guide - logo" src="images/lucidworks_reference_guide.png" style="width: 150px;height: 185px;"></a>
 </div>
 </div>
 <!--+

Modified: lucene/solr/branches/cloud/site/tutorial.html
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/site/tutorial.html?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/site/tutorial.html (original)
+++ lucene/solr/branches/cloud/site/tutorial.html Mon Jan 25 14:30:17 2010
@@ -5,7 +5,7 @@
 <meta content="Apache Forrest" name="Generator">
 <meta name="Forrest-version" content="0.8">
 <meta name="Forrest-skin-name" content="lucene">
-<title>Solr tutorial (version 1.3.0.2009.08.25.11.23.42)</title>
+<title>Solr tutorial (version 1.4.0.2010.01.22.11.57.11)</title>
 <link type="text/css" href="skin/basic.css" rel="stylesheet">
 <link media="screen" type="text/css" href="skin/screen.css" rel="stylesheet">
 <link media="print" type="text/css" href="skin/print.css" rel="stylesheet">
@@ -157,7 +157,7 @@
 </div>
 <div id="credit">
 <hr>
-      This document is for Apache Solr version 1.3.0.2009.08.25.11.23.42.  If you are using a different version of Solr, please consult the documentation that was distributed with the version you are using.
+      This document is for Apache Solr version 1.4.0.2010.01.22.11.57.11.  If you are using a different version of Solr, please consult the documentation that was distributed with the version you are using.
         </div>
 <div id="roundbottom">
 <img style="display: none" class="corner" height="15" width="15" alt="" src="skin/images/rc-b-l-15-1body-2menu-3menu.png"></div>
@@ -165,7 +165,7 @@
   |alternative credits
   +-->
 <div id="credit2">
-<a href="http://www.packtpub.com/solr-1-4-enterprise-search-server?utm_source=http%3A%2F%2Flucene.apache.org%2Fsolr%2F&utm_medium=spons&utm_content=pod&utm_campaign=mdb_000275"><img border="0" title="Book: Solr 1.4 Enterprise Search Server" alt="Book: Solr 1.4 Enterprise Search Server - logo" src="images/solr-book-image.jpg" style="width: 150px;height: 185px;"></a>
+<a href="http://www.packtpub.com/solr-1-4-enterprise-search-server?utm_source=http%3A%2F%2Flucene.apache.org%2Fsolr%2F&utm_medium=spons&utm_content=pod&utm_campaign=mdb_000275"><img border="0" title="Book: Solr 1.4 Enterprise Search Server" alt="Book: Solr 1.4 Enterprise Search Server - logo" src="images/solr-book-image.jpg" style="width: 150px;height: 185px;"></a><a href="http://www.lucidimagination.com/Downloads/LucidWorks-for-Solr/Reference-Guide?sc=AP"><img border="0" title="LucidWorks for Solr Certified Distribution Reference Guide" alt="LucidWorks for Solr Certified Distribution Reference Guide - logo" src="images/lucidworks_reference_guide.png" style="width: 150px;height: 185px;"></a>
 </div>
 </div>
 <!--+
@@ -181,7 +181,7 @@
 </div>
 <h1>Solr tutorial</h1>
 <div id="motd-area">
-      This document is for Apache Solr version 1.3.0.2009.08.25.11.23.42.  If you are using a different version of Solr, please consult the documentation that was distributed with the version you are using.
+      This document is for Apache Solr version 1.4.0.2010.01.22.11.57.11.  If you are using a different version of Solr, please consult the documentation that was distributed with the version you are using.
         </div>
 <div id="minitoc-area">
 <ul class="minitoc">

Modified: lucene/solr/branches/cloud/site/version_control.html
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/site/version_control.html?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/site/version_control.html (original)
+++ lucene/solr/branches/cloud/site/version_control.html Mon Jan 25 14:30:17 2010
@@ -162,7 +162,7 @@
   |alternative credits
   +-->
 <div id="credit2">
-<a href="http://www.packtpub.com/solr-1-4-enterprise-search-server?utm_source=http%3A%2F%2Flucene.apache.org%2Fsolr%2F&utm_medium=spons&utm_content=pod&utm_campaign=mdb_000275"><img border="0" title="Book: Solr 1.4 Enterprise Search Server" alt="Book: Solr 1.4 Enterprise Search Server - logo" src="images/solr-book-image.jpg" style="width: 150px;height: 185px;"></a>
+<a href="http://www.packtpub.com/solr-1-4-enterprise-search-server?utm_source=http%3A%2F%2Flucene.apache.org%2Fsolr%2F&utm_medium=spons&utm_content=pod&utm_campaign=mdb_000275"><img border="0" title="Book: Solr 1.4 Enterprise Search Server" alt="Book: Solr 1.4 Enterprise Search Server - logo" src="images/solr-book-image.jpg" style="width: 150px;height: 185px;"></a><a href="http://www.lucidimagination.com/Downloads/LucidWorks-for-Solr/Reference-Guide?sc=AP"><img border="0" title="LucidWorks for Solr Certified Distribution Reference Guide" alt="LucidWorks for Solr Certified Distribution Reference Guide - logo" src="images/lucidworks_reference_guide.png" style="width: 150px;height: 185px;"></a>
 </div>
 </div>
 <!--+

Modified: lucene/solr/branches/cloud/site/who.html
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/site/who.html?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/site/who.html (original)
+++ lucene/solr/branches/cloud/site/who.html Mon Jan 25 14:30:17 2010
@@ -162,7 +162,7 @@
   |alternative credits
   +-->
 <div id="credit2">
-<a href="http://www.packtpub.com/solr-1-4-enterprise-search-server?utm_source=http%3A%2F%2Flucene.apache.org%2Fsolr%2F&utm_medium=spons&utm_content=pod&utm_campaign=mdb_000275"><img border="0" title="Book: Solr 1.4 Enterprise Search Server" alt="Book: Solr 1.4 Enterprise Search Server - logo" src="images/solr-book-image.jpg" style="width: 150px;height: 185px;"></a>
+<a href="http://www.packtpub.com/solr-1-4-enterprise-search-server?utm_source=http%3A%2F%2Flucene.apache.org%2Fsolr%2F&utm_medium=spons&utm_content=pod&utm_campaign=mdb_000275"><img border="0" title="Book: Solr 1.4 Enterprise Search Server" alt="Book: Solr 1.4 Enterprise Search Server - logo" src="images/solr-book-image.jpg" style="width: 150px;height: 185px;"></a><a href="http://www.lucidimagination.com/Downloads/LucidWorks-for-Solr/Reference-Guide?sc=AP"><img border="0" title="LucidWorks for Solr Certified Distribution Reference Guide" alt="LucidWorks for Solr Certified Distribution Reference Guide - logo" src="images/lucidworks_reference_guide.png" style="width: 150px;height: 185px;"></a>
 </div>
 </div>
 <!--+

Modified: lucene/solr/branches/cloud/src/java/org/apache/solr/core/PluginInfo.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/java/org/apache/solr/core/PluginInfo.java?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/java/org/apache/solr/core/PluginInfo.java (original)
+++ lucene/solr/branches/cloud/src/java/org/apache/solr/core/PluginInfo.java Mon Jan 25 14:30:17 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/branches/cloud/src/java/org/apache/solr/core/SolrConfig.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/java/org/apache/solr/core/SolrConfig.java?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/java/org/apache/solr/core/SolrConfig.java (original)
+++ lucene/solr/branches/cloud/src/java/org/apache/solr/core/SolrConfig.java Mon Jan 25 14:30:17 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/branches/cloud/src/java/org/apache/solr/core/SolrCore.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/java/org/apache/solr/core/SolrCore.java?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/java/org/apache/solr/core/SolrCore.java (original)
+++ lucene/solr/branches/cloud/src/java/org/apache/solr/core/SolrCore.java Mon Jan 25 14:30:17 2010
@@ -99,7 +99,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;
@@ -469,10 +468,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.
@@ -596,7 +592,6 @@
     reqHandlers = new RequestHandlers(this);
     reqHandlers.initHandlersFromConfig( solrConfig );
 
-    highlighter = initHighlighter();
 
     // Handle things that should eventually go away
     initDeprecatedSupport();
@@ -646,19 +641,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
@@ -841,8 +823,10 @@
   /**
    * Get the SolrHighlighter
    */
+  @Deprecated
   public SolrHighlighter getHighlighter() {
-    return highlighter;
+    HighlightComponent hl = (HighlightComponent) searchComponents.get(HighlightComponent.COMPONENT_NAME);
+    return hl==null? null: hl.getHighlighter();
   }
 
   /**
@@ -874,10 +858,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/branches/cloud/src/java/org/apache/solr/handler/component/HighlightComponent.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/java/org/apache/solr/handler/component/HighlightComponent.java?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/java/org/apache/solr/handler/component/HighlightComponent.java (original)
+++ lucene/solr/branches/cloud/src/java/org/apache/solr/handler/component/HighlightComponent.java Mon Jan 25 14:30:17 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/branches/cloud/src/java/org/apache/solr/highlight/SolrHighlighter.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/java/org/apache/solr/highlight/SolrHighlighter.java?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/java/org/apache/solr/highlight/SolrHighlighter.java (original)
+++ lucene/solr/branches/cloud/src/java/org/apache/solr/highlight/SolrHighlighter.java Mon Jan 25 14:30:17 2010
@@ -41,19 +41,19 @@
 
   // Thread safe registry
   protected final Map<String,SolrFormatter> formatters =
-    Collections.synchronizedMap( new HashMap<String, SolrFormatter>() );
+    new HashMap<String, SolrFormatter>();
 
   // Thread safe registry
   protected final Map<String,SolrFragmenter> fragmenters =
-    Collections.synchronizedMap( new HashMap<String, SolrFragmenter>() );
+    new HashMap<String, SolrFragmenter>() ;
 
   // Thread safe registry
   protected final Map<String, SolrFragListBuilder> fragListBuilders =
-    Collections.synchronizedMap( new HashMap<String, SolrFragListBuilder>() );
+    new HashMap<String, SolrFragListBuilder>() ;
 
   // Thread safe registry
   protected final Map<String, SolrFragmentsBuilder> fragmentsBuilders =
-    Collections.synchronizedMap( new HashMap<String, SolrFragmentsBuilder>() );
+    new HashMap<String, SolrFragmentsBuilder>() ;
 
   @Deprecated
   public abstract void initalize( SolrConfig config );

Modified: lucene/solr/branches/cloud/src/java/org/apache/solr/search/ExtendedDismaxQParserPlugin.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/java/org/apache/solr/search/ExtendedDismaxQParserPlugin.java?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/java/org/apache/solr/search/ExtendedDismaxQParserPlugin.java (original)
+++ lucene/solr/branches/cloud/src/java/org/apache/solr/search/ExtendedDismaxQParserPlugin.java Mon Jan 25 14:30:17 2010
@@ -104,8 +104,15 @@
     SolrParams solrParams = localParams == null ? params : new DefaultSolrParams(localParams, params);
 
     queryFields = U.parseFieldBoosts(solrParams.getParams(DMP.QF));
-    Map<String,Float> phraseFields = U.parseFieldBoosts(solrParams.getParams(DMP.PF));
-    Map<String,Float> phraseFields3 = U.parseFieldBoosts(solrParams.getParams("pf3"));
+    // Boosted phrase of the full query string
+    Map<String,Float> phraseFields = 
+      U.parseFieldBoosts(solrParams.getParams(DMP.PF));
+    // Boosted Bi-Term Shingles from the query string
+    Map<String,Float> phraseFields2 = 
+      U.parseFieldBoosts(solrParams.getParams("pf2"));
+    // Boosted Tri-Term Shingles from the query string
+    Map<String,Float> phraseFields3 = 
+      U.parseFieldBoosts(solrParams.getParams("pf3"));
 
     float tiebreaker = solrParams.getFloat(DMP.TIE, 0.0f);
 
@@ -284,7 +291,10 @@
       query.add(parsedUserQuery, BooleanClause.Occur.MUST);
 
       // sloppy phrase queries for proximity
-      if (phraseFields.size() > 0 || phraseFields3.size() > 0) {
+      if (phraseFields.size() > 0 || 
+          phraseFields2.size() > 0 ||
+          phraseFields3.size() > 0) {
+        
         // find non-field clauses
         List<Clause> normalClauses = new ArrayList<Clause>(clauses.size());
         for (Clause clause : clauses) {
@@ -298,70 +308,15 @@
           normalClauses.add(clause);
         }
 
-        Map<String,Float> pf = phraseFields;
-        if (normalClauses.size() >= 2 && pf.size() > 0) {
-          StringBuilder sb = new StringBuilder();
-          for (int i=0; i<normalClauses.size()-1; i++) {
-            sb.append('"');
-            sb.append(normalClauses.get(i).val);
-            sb.append(' ');
-            sb.append(normalClauses.get(i+1).val);
-            sb.append('"');
-            sb.append(' ');
-          }
-
-          String userPhraseQuery = sb.toString();
-
-          /* for parsing sloppy phrases using DisjunctionMaxQueries */
-          ExtendedSolrQueryParser pp =
-                  new ExtendedSolrQueryParser(this, IMPOSSIBLE_FIELD_NAME);
-          pp.addAlias(IMPOSSIBLE_FIELD_NAME,
-                  tiebreaker, pf);
-          pp.setPhraseSlop(pslop);
-          pp.makeDismax = false;  // make boolean queries instead
-          pp.setRemoveStopFilter(true);  // remove stop filter and keep stopwords
-          pp.minClauseSize = 2;  // if a stopword is removed, don't add the phrase
-
-          // TODO: perhaps we shouldn't use synonyms either...
-
-          Query phrase = pp.parse(userPhraseQuery);
-          if (phrase != null) {
-            query.add(phrase, BooleanClause.Occur.SHOULD);
-          }
-        }
-
-        pf = phraseFields3;
-        if (normalClauses.size() >= 3 && pf.size() > 0) {
-          StringBuilder sb = new StringBuilder();
-          for (int i=0; i<normalClauses.size()-2; i++) {
-            sb.append('"');
-            sb.append(normalClauses.get(i).val);
-            sb.append(' ');
-            sb.append(normalClauses.get(i+1).val);
-            sb.append(' ');
-            sb.append(normalClauses.get(i+2).val);
-            sb.append('"');
-            sb.append(' ');
-          }
-
-          String userPhraseQuery = sb.toString();
-
-          /* for parsing sloppy phrases using DisjunctionMaxQueries */
-          ExtendedSolrQueryParser pp =
-                  new ExtendedSolrQueryParser(this, IMPOSSIBLE_FIELD_NAME);
-          pp.addAlias(IMPOSSIBLE_FIELD_NAME,
-                  tiebreaker, pf);
-          pp.setPhraseSlop(pslop);
-          pp.makeDismax = false;  // make boolean queries instead
-          pp.setRemoveStopFilter(true);  // remove stop filter and keep stopwords
-          pp.minClauseSize = 2;  // keep min phrase size at 2 since stopword could have been removed in middle
-
-          Query phrase = pp.parse(userPhraseQuery);
-          if (phrase != null) {
-            query.add(phrase, BooleanClause.Occur.SHOULD);
-          }
-        }
-
+        // full phrase...
+        addShingledPhraseQueries(query, normalClauses, phraseFields, 0, 
+                                 tiebreaker, pslop);
+        // shingles...
+        addShingledPhraseQueries(query, normalClauses, phraseFields2, 2,  
+                                 tiebreaker, pslop);
+        addShingledPhraseQueries(query, normalClauses, phraseFields3, 3,
+                                 tiebreaker, pslop);
+        
       }
     }
 
@@ -380,23 +335,8 @@
       }
     }
     if (null != boostQueries) {
-      if(1 == boostQueries.size() && 1 == boostParams.length) {
-        /* legacy logic */
-        Query f = boostQueries.get(0);
-        if (1.0f == f.getBoost() && f instanceof BooleanQuery) {
-          /* if the default boost was used, and we've got a BooleanQuery
-           * extract the subqueries out and use them directly
-           */
-          for (Object c : ((BooleanQuery)f).clauses()) {
-            query.add((BooleanClause)c);
-          }
-        } else {
-          query.add(f, BooleanClause.Occur.SHOULD);
-        }
-      } else {
-        for(Query f : boostQueries) {
-          query.add(f, BooleanClause.Occur.SHOULD);
-        }
+      for(Query f : boostQueries) {
+        query.add(f, BooleanClause.Occur.SHOULD);
       }
     }
 
@@ -450,6 +390,85 @@
     return topQuery;
   }
 
+  /**
+   * Modifies the main query by adding a new optional Query consisting
+   * of shingled phrase queries across the specified clauses using the 
+   * specified field =&gt; boost mappings.
+   *
+   * @param mainQuery Where the phrase boosting queries will be added
+   * @param clauses Clauses that will be used to construct the phrases
+   * @param fields Field =&gt; boost mappings for the phrase queries
+   * @param shingleSize how big the phrases should be, 0 means a single phrase
+   * @param tiebreaker tie breker value for the DisjunctionMaxQueries
+   * @param slop slop value for the constructed phrases
+   */
+  private void addShingledPhraseQueries(final BooleanQuery mainQuery, 
+                                        final List<Clause> clauses,
+                                        final Map<String,Float> fields,
+                                        int shingleSize,
+                                        final float tiebreaker,
+                                        final int slop) 
+    throws ParseException {
+    
+    if (null == fields || fields.isEmpty() || 
+        null == clauses || clauses.size() <= shingleSize ) 
+      return;
+    
+    if (0 == shingleSize) shingleSize = clauses.size();
+
+    final int goat = shingleSize-1; // :TODO: better name for var?
+
+    StringBuilder userPhraseQuery = new StringBuilder();
+      for (int i=0; i < clauses.size() - goat; i++) {
+        userPhraseQuery.append('"');
+        for (int j=0; j <= goat; j++) {
+          userPhraseQuery.append(clauses.get(i + j).val);
+          userPhraseQuery.append(' ');
+        }
+        userPhraseQuery.append('"');
+        userPhraseQuery.append(' ');
+      }
+
+      /* for parsing sloppy phrases using DisjunctionMaxQueries */
+      ExtendedSolrQueryParser pp =
+        new ExtendedSolrQueryParser(this, IMPOSSIBLE_FIELD_NAME);
+
+      pp.addAlias(IMPOSSIBLE_FIELD_NAME, tiebreaker, fields);
+      pp.setPhraseSlop(slop);
+      pp.setRemoveStopFilter(true);  // remove stop filter and keep stopwords
+
+      /* :TODO: reevaluate using makeDismax=true vs false...
+       * 
+       * The DismaxQueryParser always used DisjunctionMaxQueries for the 
+       * pf boost, for the same reasons it used them for the qf fields.
+       * When Yonik first wrote the ExtendedDismaxQParserPlugin, he added
+       * the "makeDismax=false" property to use BooleanQueries instead, but 
+       * when asked why his response was "I honestly don't recall" ...
+       *
+       * https://issues.apache.org/jira/browse/SOLR-1553?focusedCommentId=12793813#action_12793813
+       *
+       * so for now, we continue to use dismax style queries becuse it 
+       * seems the most logical and is back compatible, but we should 
+       * try to figure out what Yonik was thinking at the time (because he 
+       * rarely does things for no reason)
+       */
+      pp.makeDismax = true; 
+
+
+      // minClauseSize is independent of the shingleSize because of stop words
+      // (if they are removed from the middle, so be it, but we need at least 
+      // two or there shouldn't be a boost)
+      pp.minClauseSize = 2;  
+      
+      // TODO: perhaps we shouldn't use synonyms either...
+
+      Query phrase = pp.parse(userPhraseQuery.toString());
+      if (phrase != null) {
+        mainQuery.add(phrase, BooleanClause.Occur.SHOULD);
+      }
+  }
+
+
   @Override
   public String[] getDefaultHighlightFields() {
     String[] highFields = queryFields.keySet().toArray(new String[0]);

Modified: lucene/solr/branches/cloud/src/site/src/documentation/skinconf.xml
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/site/src/documentation/skinconf.xml?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/site/src/documentation/skinconf.xml (original)
+++ lucene/solr/branches/cloud/src/site/src/documentation/skinconf.xml Mon Jan 25 14:30:17 2010
@@ -446,6 +446,15 @@
       <height>185</height>
     </credit>
 
+    <credit box-location="alt2">
+      <name>LucidWorks for Solr Certified Distribution Reference Guide</name>
+      <url>http://www.lucidimagination.com/Downloads/LucidWorks-for-Solr/Reference-Guide?sc=AP</url>
+      <image>images/lucidworks_reference_guide.png</image>
+      <width>150</width>
+      <height>185</height>
+    </credit>
+
+
     <!-- A credit with @role="pdf" will be used to compose a footer
      for each page in the PDF, using either "name" or "url" or both.
     -->

Modified: lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-SOLR-749.xml
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-SOLR-749.xml?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-SOLR-749.xml (original)
+++ lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-SOLR-749.xml Mon Jan 25 14:30:17 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/branches/cloud/src/test/test-files/solr/conf/solrconfig-altdirectory.xml
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-altdirectory.xml?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-altdirectory.xml (original)
+++ lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-altdirectory.xml Mon Jan 25 14:30:17 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/branches/cloud/src/test/test-files/solr/conf/solrconfig-delpolicy1.xml
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-delpolicy1.xml?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-delpolicy1.xml (original)
+++ lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-delpolicy1.xml Mon Jan 25 14:30:17 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/branches/cloud/src/test/test-files/solr/conf/solrconfig-delpolicy2.xml
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-delpolicy2.xml?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-delpolicy2.xml (original)
+++ lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-delpolicy2.xml Mon Jan 25 14:30:17 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/branches/cloud/src/test/test-files/solr/conf/solrconfig-duh-optimize.xml
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-duh-optimize.xml?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-duh-optimize.xml (original)
+++ lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-duh-optimize.xml Mon Jan 25 14:30:17 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/branches/cloud/src/test/test-files/solr/conf/solrconfig-facet-sort.xml
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-facet-sort.xml?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-facet-sort.xml (original)
+++ lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-facet-sort.xml Mon Jan 25 14:30:17 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/branches/cloud/src/test/test-files/solr/conf/solrconfig-functionquery.xml
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-functionquery.xml?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-functionquery.xml (original)
+++ lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-functionquery.xml Mon Jan 25 14:30:17 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/branches/cloud/src/test/test-files/solr/conf/solrconfig-highlight.xml
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-highlight.xml?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-highlight.xml (original)
+++ lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-highlight.xml Mon Jan 25 14:30:17 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/branches/cloud/src/test/test-files/solr/conf/solrconfig-legacy.xml
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-legacy.xml?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-legacy.xml (original)
+++ lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-legacy.xml Mon Jan 25 14:30:17 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/branches/cloud/src/test/test-files/solr/conf/solrconfig-nocache.xml
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-nocache.xml?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-nocache.xml (original)
+++ lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-nocache.xml Mon Jan 25 14:30:17 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/branches/cloud/src/test/test-files/solr/conf/solrconfig-propinject-indexdefault.xml
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-propinject-indexdefault.xml?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-propinject-indexdefault.xml (original)
+++ lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-propinject-indexdefault.xml Mon Jan 25 14:30:17 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/branches/cloud/src/test/test-files/solr/conf/solrconfig-propinject.xml
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-propinject.xml?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-propinject.xml (original)
+++ lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-propinject.xml Mon Jan 25 14:30:17 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/branches/cloud/src/test/test-files/solr/conf/solrconfig-termindex.xml
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-termindex.xml?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-termindex.xml (original)
+++ lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-termindex.xml Mon Jan 25 14:30:17 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/branches/cloud/src/test/test-files/solr/conf/solrconfig-xinclude.xml
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-xinclude.xml?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-xinclude.xml (original)
+++ lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig-xinclude.xml Mon Jan 25 14:30:17 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/branches/cloud/src/test/test-files/solr/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig.xml?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig.xml (original)
+++ lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig.xml Mon Jan 25 14:30:17 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/branches/cloud/src/test/test-files/solr/conf/solrconfig_perf.xml
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig_perf.xml?rev=902820&r1=902819&r2=902820&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig_perf.xml (original)
+++ lucene/solr/branches/cloud/src/test/test-files/solr/conf/solrconfig_perf.xml Mon Jan 25 14:30:17 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



Mime
View raw message