You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2011/01/13 03:09:56 UTC

svn commit: r1058390 [12/16] - in /lucene/dev/branches/bulkpostings: ./ dev-tools/ dev-tools/eclipse/ dev-tools/idea/ dev-tools/idea/.idea/ dev-tools/idea/.idea/libraries/ dev-tools/idea/lucene/ dev-tools/idea/lucene/contrib/ dev-tools/idea/lucene/cont...

Modified: lucene/dev/branches/bulkpostings/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/UAX29URLEmailTokenizer.jflex
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/UAX29URLEmailTokenizer.jflex?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/UAX29URLEmailTokenizer.jflex (original)
+++ lucene/dev/branches/bulkpostings/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/UAX29URLEmailTokenizer.jflex Thu Jan 13 02:09:33 2011
@@ -45,14 +45,6 @@ import org.apache.lucene.util.AttributeS
  *   <li>&lt;IDEOGRAPHIC&gt;: A single CJKV ideographic character</li>
  *   <li>&lt;HIRAGANA&gt;: A single hiragana character</li>
  * </ul>
- * <b>WARNING</b>: Because JFlex does not support Unicode supplementary 
- * characters (characters above the Basic Multilingual Plane, which contains
- * those up to and including U+FFFF), this scanner will not recognize them
- * properly.  If you need to be able to process text containing supplementary 
- * characters, consider using the ICU4J-backed implementation in modules/analysis/icu  
- * (org.apache.lucene.analysis.icu.segmentation.ICUTokenizer)
- * instead of this class, since the ICU4J-backed implementation does not have
- * this limitation.
  */
 %%
 
@@ -70,15 +62,30 @@ import org.apache.lucene.util.AttributeS
   super(in);
 %init}
 
+
+%include src/java/org/apache/lucene/analysis/standard/SUPPLEMENTARY.jflex-macro
+ALetter = ([\p{WB:ALetter}] | {ALetterSupp})
+Format =  ([\p{WB:Format}] | {FormatSupp})
+Numeric = ([\p{WB:Numeric}] | {NumericSupp})
+Extend =  ([\p{WB:Extend}] | {ExtendSupp})
+Katakana = ([\p{WB:Katakana}] | {KatakanaSupp})
+MidLetter = ([\p{WB:MidLetter}] | {MidLetterSupp})
+MidNum = ([\p{WB:MidNum}] | {MidNumSupp})
+MidNumLet = ([\p{WB:MidNumLet}] | {MidNumLetSupp})
+ExtendNumLet = ([\p{WB:ExtendNumLet}] | {ExtendNumLetSupp})
+ComplexContext = ([\p{LB:Complex_Context}] | {ComplexContextSupp})
+Han = ([\p{Script:Han}] | {HanSupp})
+Hiragana = ([\p{Script:Hiragana}] | {HiraganaSupp})
+
 // UAX#29 WB4. X (Extend | Format)* --> X
 //
-ALetterEx      = \p{WB:ALetter}                     [\p{WB:Format}\p{WB:Extend}]*
+ALetterEx      = {ALetter}                     ({Format} | {Extend})*
 // TODO: Convert hard-coded full-width numeric range to property intersection (something like [\p{Full-Width}&&\p{Numeric}]) once JFlex supports it
-NumericEx      = [\p{WB:Numeric}\uFF10-\uFF19]      [\p{WB:Format}\p{WB:Extend}]*
-KatakanaEx     = \p{WB:Katakana}                    [\p{WB:Format}\p{WB:Extend}]* 
-MidLetterEx    = [\p{WB:MidLetter}\p{WB:MidNumLet}] [\p{WB:Format}\p{WB:Extend}]* 
-MidNumericEx   = [\p{WB:MidNum}\p{WB:MidNumLet}]    [\p{WB:Format}\p{WB:Extend}]*
-ExtendNumLetEx = \p{WB:ExtendNumLet}                [\p{WB:Format}\p{WB:Extend}]*
+NumericEx      = ({Numeric} | [\uFF10-\uFF19]) ({Format} | {Extend})*
+KatakanaEx     = {Katakana}                    ({Format} | {Extend})* 
+MidLetterEx    = ({MidLetter} | {MidNumLet})   ({Format} | {Extend})* 
+MidNumericEx   = ({MidNum} | {MidNumLet})      ({Format} | {Extend})*
+ExtendNumLetEx = {ExtendNumLet}                ({Format} | {Extend})*
 
 
 // URL and E-mail syntax specifications:
@@ -348,12 +355,12 @@ EMAIL = {EMAILlocalPart} "@" ({DomainNam
 //
 //    http://www.unicode.org/reports/tr14/#SA
 //
-\p{LB:Complex_Context}+ { if (populateAttributes(SOUTH_EAST_ASIAN_TYPE)) return true; }
+{ComplexContext}+ { if (populateAttributes(SOUTH_EAST_ASIAN_TYPE)) return true; }
 
 // UAX#29 WB14.  Any ÷ Any
 //
-\p{Script:Han} { if (populateAttributes(IDEOGRAPHIC_TYPE)) return true; }
-\p{Script:Hiragana} { if (populateAttributes(HIRAGANA_TYPE)) return true; }
+{Han} { if (populateAttributes(IDEOGRAPHIC_TYPE)) return true; }
+{Hiragana} { if (populateAttributes(HIRAGANA_TYPE)) return true; }
 
 
 // UAX#29 WB3.   CR × LF

Modified: lucene/dev/branches/bulkpostings/modules/analysis/common/src/java/org/apache/lucene/analysis/util/StemmerUtil.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/modules/analysis/common/src/java/org/apache/lucene/analysis/util/StemmerUtil.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/modules/analysis/common/src/java/org/apache/lucene/analysis/util/StemmerUtil.java (original)
+++ lucene/dev/branches/bulkpostings/modules/analysis/common/src/java/org/apache/lucene/analysis/util/StemmerUtil.java Thu Jan 13 02:09:33 2011
@@ -57,6 +57,25 @@ public class StemmerUtil {
   }
   
   /**
+   * Returns true if the character array ends with the suffix.
+   * 
+   * @param s Input Buffer
+   * @param len length of input buffer
+   * @param suffix Suffix string to test
+   * @return true if <code>s</code> ends with <code>suffix</code>
+   */
+  public static boolean endsWith(char s[], int len, char suffix[]) {
+    final int suffixLen = suffix.length;
+    if (suffixLen > len)
+      return false;
+    for (int i = suffixLen - 1; i >= 0; i--)
+      if (s[len -(suffixLen - i)] != suffix[i])
+        return false;
+    
+    return true;
+  }
+  
+  /**
    * Delete a character in-place
    * 
    * @param s Input Buffer

Modified: lucene/dev/branches/bulkpostings/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestStandardAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestStandardAnalyzer.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestStandardAnalyzer.java (original)
+++ lucene/dev/branches/bulkpostings/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestStandardAnalyzer.java Thu Jan 13 02:09:33 2011
@@ -201,4 +201,10 @@ public class TestStandardAnalyzer extend
     WordBreakTestUnicode_6_0_0 wordBreakTest = new WordBreakTestUnicode_6_0_0();
     wordBreakTest.test(a);
   }
+  
+  public void testSupplementary() throws Exception {
+    BaseTokenStreamTestCase.assertAnalyzesTo(a, "𩬅艱鍟䇹愯瀛", 
+        new String[] {"𩬅", "艱", "鍟", "䇹", "愯", "瀛"},
+        new String[] { "<IDEOGRAPHIC>", "<IDEOGRAPHIC>", "<IDEOGRAPHIC>", "<IDEOGRAPHIC>", "<IDEOGRAPHIC>", "<IDEOGRAPHIC>" });
+  }
 }

Modified: lucene/dev/branches/bulkpostings/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestUAX29URLEmailTokenizer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestUAX29URLEmailTokenizer.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestUAX29URLEmailTokenizer.java (original)
+++ lucene/dev/branches/bulkpostings/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestUAX29URLEmailTokenizer.java Thu Jan 13 02:09:33 2011
@@ -400,4 +400,10 @@ public class TestUAX29URLEmailTokenizer 
     WordBreakTestUnicode_6_0_0 wordBreakTest = new WordBreakTestUnicode_6_0_0();
     wordBreakTest.test(a);
   }
+  
+  public void testSupplementary() throws Exception {
+    BaseTokenStreamTestCase.assertAnalyzesTo(a, "𩬅艱鍟䇹愯瀛", 
+        new String[] {"𩬅", "艱", "鍟", "䇹", "愯", "瀛"},
+        new String[] { "<IDEOGRAPHIC>", "<IDEOGRAPHIC>", "<IDEOGRAPHIC>", "<IDEOGRAPHIC>", "<IDEOGRAPHIC>", "<IDEOGRAPHIC>" });
+  }
 }

Modified: lucene/dev/branches/bulkpostings/modules/analysis/common/src/test/org/apache/lucene/collation/CollationTestBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/modules/analysis/common/src/test/org/apache/lucene/collation/CollationTestBase.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/modules/analysis/common/src/test/org/apache/lucene/collation/CollationTestBase.java (original)
+++ lucene/dev/branches/bulkpostings/modules/analysis/common/src/test/org/apache/lucene/collation/CollationTestBase.java Thu Jan 13 02:09:33 2011
@@ -26,13 +26,12 @@ import org.apache.lucene.index.IndexWrit
 import org.apache.lucene.index.IndexWriterConfig;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.index.IndexReader;
-import org.apache.lucene.search.IndexSearcher;
 import org.apache.lucene.search.ScoreDoc;
 import org.apache.lucene.search.Query;
 import org.apache.lucene.search.TermRangeFilter;
 import org.apache.lucene.search.TermQuery;
 import org.apache.lucene.search.TermRangeQuery;
-import org.apache.lucene.search.Searcher;
+import org.apache.lucene.search.IndexSearcher;
 import org.apache.lucene.search.Sort;
 import org.apache.lucene.search.SortField;
 import org.apache.lucene.document.Field;
@@ -215,7 +214,7 @@ public abstract class CollationTestBase 
     }
     writer.optimize();
     writer.close();
-    Searcher searcher = new IndexSearcher(indexStore, true);
+    IndexSearcher searcher = new IndexSearcher(indexStore, true);
 
     Sort sort = new Sort();
     Query queryX = new TermQuery(new Term ("contents", "x"));
@@ -236,7 +235,7 @@ public abstract class CollationTestBase 
     
   // Make sure the documents returned by the search match the expected list
   // Copied from TestSort.java
-  private void assertMatches(Searcher searcher, Query query, Sort sort, 
+  private void assertMatches(IndexSearcher searcher, Query query, Sort sort, 
                              String expectedResult) throws IOException {
     ScoreDoc[] result = searcher.search(query, null, 1000, sort).scoreDocs;
     StringBuilder buff = new StringBuilder(10);

Modified: lucene/dev/branches/bulkpostings/modules/analysis/icu/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/modules/analysis/icu/build.xml?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/modules/analysis/icu/build.xml (original)
+++ lucene/dev/branches/bulkpostings/modules/analysis/icu/build.xml Thu Jan 13 02:09:33 2011
@@ -107,6 +107,23 @@ are part of the ICU4C package. See http:
     </java>
   </target>
 			
+  <property name="uax29.supp.macros.output.file" 
+            location="../common/src/java/org/apache/lucene/analysis/standard/SUPPLEMENTARY.jflex-macro"/>
+
+  <target name="gen-uax29-supp-macros" depends="compile-tools">
+    <java
+      classname="org.apache.lucene.analysis.icu.GenerateJFlexSupplementaryMacros"
+      dir="."
+      fork="true"
+      failonerror="true"
+      output="${uax29.supp.macros.output.file}">
+      <classpath>
+      	<path refid="additional.dependencies"/>
+      	<pathelement location="${build.dir}/classes/tools"/>
+      </classpath>
+    </java>
+  </target>
+			
   <target name="compile-tools">
     <compile
       srcdir="src/tools/java"

Modified: lucene/dev/branches/bulkpostings/modules/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/modules/build.xml?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/modules/build.xml (original)
+++ lucene/dev/branches/bulkpostings/modules/build.xml Thu Jan 13 02:09:33 2011
@@ -22,6 +22,7 @@
     <sequential>
       <subant target="test" inheritall="false" failonerror="true">
         <fileset dir="analysis" includes="build.xml" />
+        <fileset dir="benchmark" includes="build.xml" />
       </subant>
     </sequential>
   </target>
@@ -30,6 +31,7 @@
     <sequential>
       <subant target="compile" inheritall="false" failonerror="true">
         <fileset dir="analysis" includes="build.xml" />
+        <fileset dir="benchmark" includes="build.xml" />
       </subant>
     </sequential>
   </target>
@@ -38,6 +40,7 @@
     <sequential>
       <subant target="compile-test" inheritall="false" failonerror="true">
         <fileset dir="analysis" includes="build.xml" />
+        <fileset dir="benchmark" includes="build.xml" />
       </subant>
     </sequential>
   </target>
@@ -46,6 +49,7 @@
     <sequential>
       <subant target="javadocs" inheritall="false" failonerror="true">
         <fileset dir="analysis" includes="build.xml" />
+        <fileset dir="benchmark" includes="build.xml" />
       </subant>
     </sequential>
   </target>
@@ -54,6 +58,7 @@
     <sequential>
       <subant target="dist-maven" inheritall="false" failonerror="true">
         <fileset dir="analysis" includes="build.xml" />
+        <fileset dir="benchmark" includes="build.xml" />
       </subant>
     </sequential>
   </target>
@@ -62,6 +67,7 @@
     <sequential>
       <subant target="clean" inheritall="false" failonerror="true">
         <fileset dir="analysis" includes="build.xml" />
+        <fileset dir="benchmark" includes="build.xml" />
       </subant>
     </sequential>
   </target>

Modified: lucene/dev/branches/bulkpostings/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/CHANGES.txt?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/CHANGES.txt (original)
+++ lucene/dev/branches/bulkpostings/solr/CHANGES.txt Thu Jan 13 02:09:33 2011
@@ -26,7 +26,7 @@ Versions of Major Components
 ---------------------
 Apache Lucene trunk
 Apache Tika 0.8-SNAPSHOT
-Carrot2 3.1.0
+Carrot2 3.4.2
 Velocity 1.6.4 and Velocity Tools 2.0
 
 
@@ -686,6 +686,10 @@ Other Changes
 * SOLR-2289: Tweak spatial coords for example docs so they are a bit
   more spread out (Erick Erickson via hossman)
 
+* SOLR-2288: Small tweaks to eliminate compiler warnings.  primarily
+  using Generics where applicable in method/object declatations, and
+  adding @SuppressWarnings("unchecked") when appropriate (hossman)
+
 Build
 ----------------------
 

Modified: lucene/dev/branches/bulkpostings/solr/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/build.xml?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/build.xml (original)
+++ lucene/dev/branches/bulkpostings/solr/build.xml Thu Jan 13 02:09:33 2011
@@ -361,6 +361,10 @@
        classpathref="test.compile.classpath">
       <src path="${src}/test" />
     </solr-javac>
+    <!-- Copy any data files present to the classpath -->
+    <copy todir="${dest}/tests">
+      <fileset dir="${src}/test-files" excludes="**/*.java"/>
+    </copy>
   </target>
 
   <!-- Run core unit tests. -->
@@ -421,7 +425,7 @@
            maxmemory="512M"
            errorProperty="tests.failed"
            failureProperty="tests.failed"
-           dir="src/test/test-files/"
+           dir="@{tempDir}/@{threadNum}"
            tempdir="@{tempDir}/@{threadNum}"
            forkmode="perBatch"
            >
@@ -730,7 +734,7 @@
         excludes="lib/README.committers.txt **/data/ **/logs/* **/classes/ **/*.sh **/bin/ src/scripts/ src/site/build/ **/target/ client/ruby/flare/ client/python contrib/**/build/ **/*.iml **/*.ipr **/*.iws contrib/clustering/example/lib/** contrib/clustering/lib/downloads/** contrib/analysis-extras/lib/**" />
       <tarfileset dir="."
         prefix="${fullnamever}"
-        includes="src/test/test-files/solr/lib/classes/empty-file-main-lib.txt" />
+        includes="src/test-files/solr/lib/classes/empty-file-main-lib.txt" />
       <tarfileset dir="."
         mode="755"
         prefix="${fullnamever}"

Modified: lucene/dev/branches/bulkpostings/solr/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/common-build.xml?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/common-build.xml (original)
+++ lucene/dev/branches/bulkpostings/solr/common-build.xml Thu Jan 13 02:09:33 2011
@@ -81,6 +81,10 @@
   <!-- Java Version we are compatible with -->
   <property name="java.compat.version" value="1.6" />
 
+  <!-- clover wants to run with -lib, otherwise we prefer a repeatable
+       classpath -->
+  <property name="javac.includeAntRuntime" value="${run.clover}"/>
+
   <!-- Solr Implementation Version -->
   <!--
        This can be any string value that does not include spaces
@@ -263,8 +267,10 @@
              source="${java.compat.version}"
              debug="on"
              encoding="utf8"
+             includeAntRuntime="${javac.includeAntRuntime}"
              sourcepath=""
              classpathref="@{classpathref}">
+         <compilerarg line="-Xlint -Xlint:-deprecation -Xlint:-serial"/>
          <nested />
       </javac>
     </sequential>

Modified: lucene/dev/branches/bulkpostings/solr/contrib/analysis-extras/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/contrib/analysis-extras/build.xml?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/contrib/analysis-extras/build.xml (original)
+++ lucene/dev/branches/bulkpostings/solr/contrib/analysis-extras/build.xml Thu Jan 13 02:09:33 2011
@@ -118,6 +118,10 @@
                 classpathref="test.classpath">
       <src path="src/test"/>
     </solr-javac>
+    <!-- Copy any data files present to the classpath -->
+    <copy todir="${dest}/test-classes">
+      <fileset dir="src/test-files" excludes="**/*.java"/>
+    </copy>
   </target>
 
   <target name="example" depends="build,dist">
@@ -136,7 +140,7 @@
            maxmemory="512M"
            errorProperty="tests.failed"
            failureProperty="tests.failed"
-           dir="src/test/test-files/"
+           dir="${junit.output.dir}"
            tempdir="${junit.output.dir}"
            forkmode="perBatch"
             >

Modified: lucene/dev/branches/bulkpostings/solr/contrib/clustering/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/contrib/clustering/build.xml?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/contrib/clustering/build.xml (original)
+++ lucene/dev/branches/bulkpostings/solr/contrib/clustering/build.xml Thu Jan 13 02:09:33 2011
@@ -90,6 +90,10 @@
                 classpathref="test.classpath">
       <src path="src/test/java"/>
     </solr-javac>
+    <!-- Copy any data files present to the classpath -->
+    <copy todir="${dest}/test-classes">
+      <fileset dir="src/test/resources" excludes="**/*.java"/>
+    </copy>
   </target>
 
   <target name="example" depends="build,dist">
@@ -108,7 +112,7 @@
            maxmemory="512M"
            errorProperty="tests.failed"
            failureProperty="tests.failed"
-           dir="src/test/resources/"
+           dir="${junit.output.dir}"
            tempdir="${junit.output.dir}"
            forkmode="perBatch"
             >

Modified: lucene/dev/branches/bulkpostings/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngine.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngine.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngine.java (original)
+++ lucene/dev/branches/bulkpostings/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngine.java Thu Jan 13 02:09:33 2011
@@ -38,6 +38,7 @@ import org.apache.solr.common.util.Named
 import org.apache.solr.common.util.SimpleOrderedMap;
 import org.apache.solr.core.SolrCore;
 import org.apache.solr.handler.clustering.SearchClusteringEngine;
+import org.apache.solr.handler.component.HighlightComponent;
 import org.apache.solr.highlight.SolrHighlighter;
 import org.apache.solr.request.LocalSolrQueryRequest;
 import org.apache.solr.request.SolrQueryRequest;
@@ -175,7 +176,7 @@ public class CarrotClusteringEngine exte
     SolrQueryRequest req = null;
     String[] snippetFieldAry = null;
     if (produceSummary == true) {
-      highlighter = core.getHighlighter();
+      highlighter = HighlightComponent.getHighlighter(core);
       if (highlighter != null){
         Map args = new HashMap();
         snippetFieldAry = new String[]{snippetField};

Modified: lucene/dev/branches/bulkpostings/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/carrot2/LuceneLanguageModelFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/carrot2/LuceneLanguageModelFactory.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/carrot2/LuceneLanguageModelFactory.java (original)
+++ lucene/dev/branches/bulkpostings/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/carrot2/LuceneLanguageModelFactory.java Thu Jan 13 02:09:33 2011
@@ -31,7 +31,7 @@ import org.apache.lucene.analysis.tokena
 import org.carrot2.core.LanguageCode;
 import org.carrot2.text.analysis.ExtendedWhitespaceTokenizer;
 import org.carrot2.text.analysis.ITokenizer;
-import org.carrot2.text.linguistic.BaseLanguageModelFactory;
+import org.carrot2.text.linguistic.DefaultLanguageModelFactory;
 import org.carrot2.text.linguistic.IStemmer;
 import org.carrot2.text.linguistic.IdentityStemmer;
 import org.carrot2.text.util.MutableCharArray;
@@ -62,7 +62,7 @@ import org.tartarus.snowball.ext.Turkish
  * change, the changes can be made in this class.
  */
 @Bindable(prefix = "DefaultLanguageModelFactory")
-public class LuceneLanguageModelFactory extends BaseLanguageModelFactory {
+public class LuceneLanguageModelFactory extends DefaultLanguageModelFactory {
 	final static Logger logger = org.slf4j.LoggerFactory
 			.getLogger(LuceneLanguageModelFactory.class);
 

Modified: lucene/dev/branches/bulkpostings/solr/contrib/clustering/src/test/java/org/apache/solr/handler/clustering/AbstractClusteringTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/contrib/clustering/src/test/java/org/apache/solr/handler/clustering/AbstractClusteringTestCase.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/contrib/clustering/src/test/java/org/apache/solr/handler/clustering/AbstractClusteringTestCase.java (original)
+++ lucene/dev/branches/bulkpostings/solr/contrib/clustering/src/test/java/org/apache/solr/handler/clustering/AbstractClusteringTestCase.java Thu Jan 13 02:09:33 2011
@@ -28,7 +28,7 @@ public abstract class AbstractClustering
 
   @BeforeClass
   public static void beforeClass() throws Exception {
-    initCore("solrconfig.xml", "schema.xml");
+    initCore("solrconfig.xml", "schema.xml", "solr-clustering");
     numberOfDocs = 0;
     for (String[] doc : DOCUMENTS) {
       assertNull(h.validateUpdate(adoc("id", Integer.toString(numberOfDocs), "url", doc[0], "title", doc[1], "snippet", doc[2])));

Modified: lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/CHANGES.txt?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/CHANGES.txt (original)
+++ lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/CHANGES.txt Thu Jan 13 02:09:33 2011
@@ -8,7 +8,7 @@ HTTP data sources quick and easy.
 
 
 $Id$
-==================  1.5.0-dev ==================
+==================  4.0.0-dev ==================
 Upgrading from Solr 1.4
 ----------------------
 
@@ -65,6 +65,9 @@ Bug Fixes
 
 * SOLR-1811: formatDate should use the current NOW value always (Sean Timm via noble)
 
+* SOLR-2310: getTimeElapsedSince() returns incorrect hour value when the elapse is over 60 hours
+  (tom liu via koji)
+
 Other Changes
 ----------------------
 

Modified: lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/build.xml?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/build.xml (original)
+++ lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/build.xml Thu Jan 13 02:09:33 2011
@@ -123,6 +123,10 @@
   	                classpathref="test.classpath">
   	  <src path="src/test/java" />
   	</solr-javac>
+    <!-- Copy any data files present to the classpath -->
+    <copy todir="target/test-classes">
+      <fileset dir="src/test/resources" excludes="**/*.java"/>
+    </copy>
   </target>
 
   <target name="compileExtrasTests" depends="compileExtras">
@@ -130,6 +134,10 @@
   	                classpathref="test.classpath">
   	  <src path="src/extras/test/java" />
   	</solr-javac>
+    <!-- Copy any data files present to the classpath -->
+    <copy todir="target/extras/test-classes">
+      <fileset dir="src/extras/test/resources" excludes="**/*.java"/>
+    </copy>
   </target>
 
   <property name="tempDir" value="${junit.output.dir}/temp" />
@@ -156,7 +164,7 @@
            maxmemory="512M"
            errorProperty="tests.failed"
            failureProperty="tests.failed"
-           dir="src/test/resources/"
+           dir="${tempDir}"
            tempdir="${tempDir}"
            forkmode="perBatch"
            >
@@ -217,7 +225,7 @@
            maxmemory="512M"
            errorProperty="tests.failed"
            failureProperty="tests.failed"
-           dir="src/extras/test/resources/"
+           dir="${tempDir}"
            tempdir="${tempDir}"
            forkmode="perBatch"
            >

Modified: lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/extras/test/java/org/apache/solr/handler/dataimport/TestMailEntityProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/extras/test/java/org/apache/solr/handler/dataimport/TestMailEntityProcessor.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/extras/test/java/org/apache/solr/handler/dataimport/TestMailEntityProcessor.java (original)
+++ lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/extras/test/java/org/apache/solr/handler/dataimport/TestMailEntityProcessor.java Thu Jan 13 02:09:33 2011
@@ -188,7 +188,7 @@ public class TestMailEntityProcessor ext
     Boolean commitCalled;
 
     public SolrWriterImpl() {
-      super(null, ".");
+      super(null, ".", null);
     }
 
     public boolean upload(SolrInputDocument doc) {

Modified: lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/extras/test/java/org/apache/solr/handler/dataimport/TestTikaEntityProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/extras/test/java/org/apache/solr/handler/dataimport/TestTikaEntityProcessor.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/extras/test/java/org/apache/solr/handler/dataimport/TestTikaEntityProcessor.java (original)
+++ lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/extras/test/java/org/apache/solr/handler/dataimport/TestTikaEntityProcessor.java Thu Jan 13 02:09:33 2011
@@ -25,7 +25,7 @@ import org.junit.BeforeClass;
 public class TestTikaEntityProcessor extends AbstractDataImportHandlerTestCase {
   @BeforeClass
   public static void beforeClass() throws Exception {
-    initCore("dataimport-solrconfig.xml", "dataimport-schema-no-unique-key.xml");
+    initCore("dataimport-solrconfig.xml", "dataimport-schema-no-unique-key.xml", "solr-dihextras");
   }
 
   public void testIndexingWithTikaEntityProcessor() throws Exception {
@@ -33,7 +33,7 @@ public class TestTikaEntityProcessor ext
             "<dataConfig>" +
                     "  <dataSource type=\"BinFileDataSource\"/>" +
                     "  <document>" +
-                    "    <entity processor=\"TikaEntityProcessor\" url=\"../../../../../extraction/src/test/resources/solr-word.pdf\" >" +
+                    "    <entity processor=\"TikaEntityProcessor\" url=\"" + getFile("solr-word.pdf").getAbsolutePath() + "\" >" +
                     "      <field column=\"Author\" meta=\"true\" name=\"author\"/>" +
                     "      <field column=\"title\" meta=\"true\" name=\"docTitle\"/>" +
                     "      <field column=\"text\"/>" +

Modified: lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImportHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImportHandler.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImportHandler.java (original)
+++ lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImportHandler.java Thu Jan 13 02:09:33 2011
@@ -194,7 +194,7 @@ public class DataImportHandler extends R
                 req.getCore().getUpdateProcessingChain(params.get(UpdateParams.UPDATE_PROCESSOR));
         UpdateRequestProcessor processor = processorChain.createProcessor(req, rsp);
         SolrResourceLoader loader = req.getCore().getResourceLoader();
-        SolrWriter sw = getSolrWriter(processor, loader, requestParams);
+        SolrWriter sw = getSolrWriter(processor, loader, requestParams, req);
 
         if (requestParams.debug) {
           if (debugEnabled) {
@@ -276,9 +276,9 @@ public class DataImportHandler extends R
   }
 
   private SolrWriter getSolrWriter(final UpdateRequestProcessor processor,
-                                   final SolrResourceLoader loader, final DataImporter.RequestParams requestParams) {
+                                   final SolrResourceLoader loader, final DataImporter.RequestParams requestParams, SolrQueryRequest req) {
 
-    return new SolrWriter(processor, loader.getConfigDir(), myName) {
+    return new SolrWriter(processor, loader.getConfigDir(), myName, req) {
 
       @Override
       public boolean upload(SolrInputDocument document) {

Modified: lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DocBuilder.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DocBuilder.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DocBuilder.java (original)
+++ lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DocBuilder.java Thu Jan 13 02:09:33 2011
@@ -949,7 +949,7 @@ public class DocBuilder {
 
   static String getTimeElapsedSince(long l) {
     l = System.currentTimeMillis() - l;
-    return (l / (60000 * 60)) % 60 + ":" + (l / 60000) % 60 + ":" + (l / 1000)
+    return (l / (60000 * 60)) + ":" + (l / 60000) % 60 + ":" + (l / 1000)
             % 60 + "." + l % 1000;
   }
 

Modified: lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/SolrWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/SolrWriter.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/SolrWriter.java (original)
+++ lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/SolrWriter.java Thu Jan 13 02:09:33 2011
@@ -17,6 +17,7 @@
 package org.apache.solr.handler.dataimport;
 
 import org.apache.solr.common.SolrInputDocument;
+import org.apache.solr.request.SolrQueryRequest;
 import org.apache.solr.update.AddUpdateCommand;
 import org.apache.solr.update.CommitUpdateCommand;
 import org.apache.solr.update.DeleteUpdateCommand;
@@ -51,21 +52,25 @@ public class SolrWriter {
 
   DebugLogger debugLogger;
 
-  public SolrWriter(UpdateRequestProcessor processor, String confDir) {
+  SolrQueryRequest req;
+
+  public SolrWriter(UpdateRequestProcessor processor, String confDir, SolrQueryRequest req) {
     this.processor = processor;
     configDir = confDir;
+    this.req = req;
   }
-  public SolrWriter(UpdateRequestProcessor processor, String confDir, String filePrefix) {
+  public SolrWriter(UpdateRequestProcessor processor, String confDir, String filePrefix, SolrQueryRequest req) {
     this.processor = processor;
     configDir = confDir;
     if(filePrefix != null){
       persistFilename = filePrefix+".properties";
     }
+    this.req = req;
   }
 
   public boolean upload(SolrInputDocument d) {
     try {
-      AddUpdateCommand command = new AddUpdateCommand();
+      AddUpdateCommand command = new AddUpdateCommand(req);
       command.solrDoc = d;
       processor.processAdd(command);
     } catch (Exception e) {
@@ -79,7 +84,7 @@ public class SolrWriter {
   public void deleteDoc(Object id) {
     try {
       log.info("Deleting document: " + id);
-      DeleteUpdateCommand delCmd = new DeleteUpdateCommand();
+      DeleteUpdateCommand delCmd = new DeleteUpdateCommand(req);
       delCmd.id = id.toString();
       processor.processDelete(delCmd);
     } catch (IOException e) {
@@ -153,7 +158,7 @@ public class SolrWriter {
   public void deleteByQuery(String query) {
     try {
       log.info("Deleting documents from Solr with query: " + query);
-      DeleteUpdateCommand delCmd = new DeleteUpdateCommand();
+      DeleteUpdateCommand delCmd = new DeleteUpdateCommand(req);
       delCmd.query = query;
       processor.processDelete(delCmd);
     } catch (IOException e) {
@@ -163,7 +168,7 @@ public class SolrWriter {
 
   public void commit(boolean optimize) {
     try {
-      CommitUpdateCommand commit = new CommitUpdateCommand(optimize);
+      CommitUpdateCommand commit = new CommitUpdateCommand(req,optimize);
       processor.processCommit(commit);
     } catch (Throwable t) {
       log.error("Exception while solr commit.", t);
@@ -172,7 +177,7 @@ public class SolrWriter {
 
   public void rollback() {
     try {
-      RollbackUpdateCommand rollback = new RollbackUpdateCommand();
+      RollbackUpdateCommand rollback = new RollbackUpdateCommand(req);
       processor.processRollback(rollback);
     } catch (Throwable t) {
       log.error("Exception while solr rollback.", t);
@@ -181,7 +186,7 @@ public class SolrWriter {
 
   public void doDeleteAll() {
     try {
-      DeleteUpdateCommand deleteCommand = new DeleteUpdateCommand();
+      DeleteUpdateCommand deleteCommand = new DeleteUpdateCommand(req);
       deleteCommand.query = "*:*";
       processor.processDelete(deleteCommand);
     } catch (IOException e) {

Modified: lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTestCase.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTestCase.java (original)
+++ lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTestCase.java Thu Jan 13 02:09:33 2011
@@ -52,6 +52,11 @@ import java.util.Map;
 public abstract class AbstractDataImportHandlerTestCase extends
         SolrTestCaseJ4 {
 
+  // note, a little twisted that we shadow this static method
+  public static void initCore(String config, String schema) throws Exception {
+    initCore(config, schema, "solr-dih");
+  }
+  
   @Override
   @Before
   public void setUp() throws Exception {

Modified: lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestContentStreamDataSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestContentStreamDataSource.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestContentStreamDataSource.java (original)
+++ lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestContentStreamDataSource.java Thu Jan 13 02:09:33 2011
@@ -39,7 +39,7 @@ import java.util.List;
  * @since solr 1.4
  */
 public class TestContentStreamDataSource extends AbstractDataImportHandlerTestCase {
-  private static final String CONF_DIR = "." + File.separator + "solr" + File.separator + "conf" + File.separator;
+  private static final String CONF_DIR = "." + File.separator + "solr-dih" + File.separator + "conf" + File.separator;
   SolrInstance instance = null;
   JettySolrRunner jetty;
 
@@ -129,12 +129,12 @@ public class TestContentStreamDataSource
       confDir.mkdirs();
 
       File f = new File(confDir, "solrconfig.xml");
-      FileUtils.copyFile(new File(getSolrConfigFile()), f);
+      FileUtils.copyFile(getFile(getSolrConfigFile()), f);
       f = new File(confDir, "schema.xml");
 
-      FileUtils.copyFile(new File(getSchemaFile()), f);
+      FileUtils.copyFile(getFile(getSchemaFile()), f);
       f = new File(confDir, "data-config.xml");
-      FileUtils.copyFile(new File(CONF_DIR + "dataconfig-contentstream.xml"), f);
+      FileUtils.copyFile(getFile(CONF_DIR + "dataconfig-contentstream.xml"), f);
     }
 
     public void tearDown() throws Exception {

Modified: lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDocBuilder.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDocBuilder.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDocBuilder.java (original)
+++ lucene/dev/branches/bulkpostings/solr/contrib/dataimporthandler/src/test/java/org/apache/solr/handler/dataimport/TestDocBuilder.java Thu Jan 13 02:09:33 2011
@@ -197,7 +197,7 @@ public class TestDocBuilder extends Abst
     Boolean finishCalled = Boolean.FALSE;
 
     public SolrWriterImpl() {
-      super(null, ".");
+      super(null, ".",null);
     }
 
     public boolean upload(SolrInputDocument doc) {

Modified: lucene/dev/branches/bulkpostings/solr/contrib/extraction/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/contrib/extraction/build.xml?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/contrib/extraction/build.xml (original)
+++ lucene/dev/branches/bulkpostings/solr/contrib/extraction/build.xml Thu Jan 13 02:09:33 2011
@@ -79,6 +79,10 @@
   	                classpathref="test.classpath">
   	  <src path="src/test/java" />
   	</solr-javac>
+    <!-- Copy any data files present to the classpath -->
+    <copy todir="${dest}/test-classes">
+      <fileset dir="src/test/resources" excludes="**/*.java"/>
+    </copy>
   </target>
 
   <property name="tempDir" value="${junit.output.dir}/temp" />
@@ -105,7 +109,7 @@
            maxmemory="512M"
            errorProperty="tests.failed"
            failureProperty="tests.failed"
-           dir="src/test/resources/"
+           dir="${tempDir}"
            tempdir="${tempDir}"
            forkmode="perBatch"
            >

Modified: lucene/dev/branches/bulkpostings/solr/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/ExtractingDocumentLoader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/ExtractingDocumentLoader.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/ExtractingDocumentLoader.java (original)
+++ lucene/dev/branches/bulkpostings/solr/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/ExtractingDocumentLoader.java Thu Jan 13 02:09:33 2011
@@ -89,7 +89,7 @@ public class ExtractingDocumentLoader ex
     this.config = config;
     this.processor = processor;
 
-    templateAdd = new AddUpdateCommand();
+    templateAdd = new AddUpdateCommand(req);
     templateAdd.overwrite = params.getBool(UpdateParams.OVERWRITE, true);
 
     //this is lightweight

Modified: lucene/dev/branches/bulkpostings/solr/contrib/extraction/src/test/java/org/apache/solr/handler/ExtractingRequestHandlerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/contrib/extraction/src/test/java/org/apache/solr/handler/ExtractingRequestHandlerTest.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/contrib/extraction/src/test/java/org/apache/solr/handler/ExtractingRequestHandlerTest.java (original)
+++ lucene/dev/branches/bulkpostings/solr/contrib/extraction/src/test/java/org/apache/solr/handler/ExtractingRequestHandlerTest.java Thu Jan 13 02:09:33 2011
@@ -43,7 +43,7 @@ import java.io.File;
 public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
   @BeforeClass
   public static void beforeClass() throws Exception {
-    initCore("solrconfig.xml", "schema.xml");
+    initCore("solrconfig.xml", "schema.xml", "solr-extraction");
   }
 
   @Before
@@ -152,6 +152,7 @@ public class ExtractingRequestHandlerTes
     assertTrue("handler is null and it shouldn't be", handler != null);
     try {
       ignoreException("unknown field 'a'");
+      ignoreException("unknown field 'meta'");  // TODO: should this exception be happening?
       loadLocal("simple.html",
       "literal.id","simple2",
       "lowernames", "true",
@@ -367,7 +368,7 @@ public class ExtractingRequestHandlerTes
       // TODO: stop using locally defined streams once stream.file and
       // stream.body work everywhere
       List<ContentStream> cs = new ArrayList<ContentStream>();
-      cs.add(new ContentStreamBase.FileStream(new File(filename)));
+      cs.add(new ContentStreamBase.FileStream(getFile(filename)));
       req.setContentStreams(cs);
       return h.queryAndResponse("/update/extract", req);
     } finally {

Modified: lucene/dev/branches/bulkpostings/solr/site/features.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/site/features.html?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/site/features.html (original)
+++ lucene/dev/branches/bulkpostings/solr/site/features.html Thu Jan 13 02:09:33 2011
@@ -48,12 +48,12 @@
     |start Search
     +-->
 <div class="searchbox">
-<form action="http://search.lucidimagination.com/p:solr" method="get" class="roundtopsmall">
+<form id="searchform" action="http://search.lucidimagination.com/p:solr" method="get" class="roundtopsmall">
 <input onFocus="getBlank (this, 'Search the site with Solr');" size="25" name="q" id="query" type="text" value="Search the site with Solr">&nbsp; 
-                    <input name="Search" value="Search" type="submit">
+                      <input onclick="selectProvider(this.form)" name="Search" value="Search" type="submit">
+                      @
+                      <select id="searchProvider" name="searchProvider"><option value="any">select provider</option><option value="lucid">Lucid Find</option><option value="sl">Search-Lucene</option></select>
 </form>
-<div style="position: relative; top: -5px; left: -10px">Powered by <a href="http://www.lucidimagination.com" style="color: #033268">Lucid Imagination</a>
-</div>
 </div>
 <!--+
     |end search
@@ -155,6 +155,43 @@ document.write("Last Published: " + docu
 <a href="http://lucene.apache.org/nutch/">Nutch</a>
 </div>
 </div>
+<script type="text/javascript">
+              function selectProvider(form) {
+                provider = form.elements['searchProvider'].value;
+                if (provider == "any") {
+                  if (Math.random() > 0.5) {
+                    provider = "lucid";
+                  } else {
+                    provider = "sl";
+                  }
+                }
+
+                if (provider == "lucid") {
+                  form.action = "http://search.lucidimagination.com/p:solr";
+                } else if (provider == "sl") {
+                  form.action = "http://search-lucene.com/solr";
+                }
+
+                days = 365; // cookie will be valid for a year
+                date = new Date();
+                date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
+                expires = "; expires=" + date.toGMTString();
+                document.cookie = "searchProvider=" + provider + expires + "; path=/";
+              }
+
+              if (document.cookie.length>0) {
+                cStart=document.cookie.indexOf("searchProvider=");
+                if (cStart!=-1) {
+                  cStart=cStart + "searchProvider=".length;
+                  cEnd=document.cookie.indexOf(";", cStart);
+                  if (cEnd==-1) {
+                    cEnd=document.cookie.length;
+                  }
+                  provider = unescape(document.cookie.substring(cStart,cEnd));
+                  document.forms['searchform'].elements['searchProvider'].value = provider;
+                }
+              }
+            </script>
 <div id="credit"></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>

Modified: lucene/dev/branches/bulkpostings/solr/site/images/solr.jpg
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/site/images/solr.jpg?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/dev/branches/bulkpostings/solr/site/index.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/site/index.html?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/site/index.html (original)
+++ lucene/dev/branches/bulkpostings/solr/site/index.html Thu Jan 13 02:09:33 2011
@@ -48,12 +48,12 @@
     |start Search
     +-->
 <div class="searchbox">
-<form action="http://search.lucidimagination.com/p:solr" method="get" class="roundtopsmall">
+<form id="searchform" action="http://search.lucidimagination.com/p:solr" method="get" class="roundtopsmall">
 <input onFocus="getBlank (this, 'Search the site with Solr');" size="25" name="q" id="query" type="text" value="Search the site with Solr">&nbsp; 
-                    <input name="Search" value="Search" type="submit">
+                      <input onclick="selectProvider(this.form)" name="Search" value="Search" type="submit">
+                      @
+                      <select id="searchProvider" name="searchProvider"><option value="any">select provider</option><option value="lucid">Lucid Find</option><option value="sl">Search-Lucene</option></select>
 </form>
-<div style="position: relative; top: -5px; left: -10px">Powered by <a href="http://www.lucidimagination.com" style="color: #033268">Lucid Imagination</a>
-</div>
 </div>
 <!--+
     |end search
@@ -155,6 +155,43 @@ document.write("Last Published: " + docu
 <a href="http://lucene.apache.org/nutch/">Nutch</a>
 </div>
 </div>
+<script type="text/javascript">
+              function selectProvider(form) {
+                provider = form.elements['searchProvider'].value;
+                if (provider == "any") {
+                  if (Math.random() > 0.5) {
+                    provider = "lucid";
+                  } else {
+                    provider = "sl";
+                  }
+                }
+
+                if (provider == "lucid") {
+                  form.action = "http://search.lucidimagination.com/p:solr";
+                } else if (provider == "sl") {
+                  form.action = "http://search-lucene.com/solr";
+                }
+
+                days = 365; // cookie will be valid for a year
+                date = new Date();
+                date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
+                expires = "; expires=" + date.toGMTString();
+                document.cookie = "searchProvider=" + provider + expires + "; path=/";
+              }
+
+              if (document.cookie.length>0) {
+                cStart=document.cookie.indexOf("searchProvider=");
+                if (cStart!=-1) {
+                  cStart=cStart + "searchProvider=".length;
+                  cEnd=document.cookie.indexOf(";", cStart);
+                  if (cEnd==-1) {
+                    cEnd=document.cookie.length;
+                  }
+                  provider = unescape(document.cookie.substring(cStart,cEnd));
+                  document.forms['searchform'].elements['searchProvider'].value = provider;
+                }
+              }
+            </script>
 <div id="credit">
 <hr>
 <a href="http://forrest.apache.org/"><img border="0" title="Built with Apache Forrest" alt="Built with Apache Forrest - logo" src="images/built-with-forrest-button.png" style="width: 88px;height: 31px;"></a>

Modified: lucene/dev/branches/bulkpostings/solr/site/issue_tracking.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/site/issue_tracking.html?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/site/issue_tracking.html (original)
+++ lucene/dev/branches/bulkpostings/solr/site/issue_tracking.html Thu Jan 13 02:09:33 2011
@@ -48,12 +48,12 @@
     |start Search
     +-->
 <div class="searchbox">
-<form action="http://search.lucidimagination.com/p:solr" method="get" class="roundtopsmall">
+<form id="searchform" action="http://search.lucidimagination.com/p:solr" method="get" class="roundtopsmall">
 <input onFocus="getBlank (this, 'Search the site with Solr');" size="25" name="q" id="query" type="text" value="Search the site with Solr">&nbsp; 
-                    <input name="Search" value="Search" type="submit">
+                      <input onclick="selectProvider(this.form)" name="Search" value="Search" type="submit">
+                      @
+                      <select id="searchProvider" name="searchProvider"><option value="any">select provider</option><option value="lucid">Lucid Find</option><option value="sl">Search-Lucene</option></select>
 </form>
-<div style="position: relative; top: -5px; left: -10px">Powered by <a href="http://www.lucidimagination.com" style="color: #033268">Lucid Imagination</a>
-</div>
 </div>
 <!--+
     |end search
@@ -155,6 +155,43 @@ document.write("Last Published: " + docu
 <a href="http://lucene.apache.org/nutch/">Nutch</a>
 </div>
 </div>
+<script type="text/javascript">
+              function selectProvider(form) {
+                provider = form.elements['searchProvider'].value;
+                if (provider == "any") {
+                  if (Math.random() > 0.5) {
+                    provider = "lucid";
+                  } else {
+                    provider = "sl";
+                  }
+                }
+
+                if (provider == "lucid") {
+                  form.action = "http://search.lucidimagination.com/p:solr";
+                } else if (provider == "sl") {
+                  form.action = "http://search-lucene.com/solr";
+                }
+
+                days = 365; // cookie will be valid for a year
+                date = new Date();
+                date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
+                expires = "; expires=" + date.toGMTString();
+                document.cookie = "searchProvider=" + provider + expires + "; path=/";
+              }
+
+              if (document.cookie.length>0) {
+                cStart=document.cookie.indexOf("searchProvider=");
+                if (cStart!=-1) {
+                  cStart=cStart + "searchProvider=".length;
+                  cEnd=document.cookie.indexOf(";", cStart);
+                  if (cEnd==-1) {
+                    cEnd=document.cookie.length;
+                  }
+                  provider = unescape(document.cookie.substring(cStart,cEnd));
+                  document.forms['searchform'].elements['searchProvider'].value = provider;
+                }
+              }
+            </script>
 <div id="credit"></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>

Modified: lucene/dev/branches/bulkpostings/solr/site/linkmap.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/site/linkmap.html?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/site/linkmap.html (original)
+++ lucene/dev/branches/bulkpostings/solr/site/linkmap.html Thu Jan 13 02:09:33 2011
@@ -48,12 +48,12 @@
     |start Search
     +-->
 <div class="searchbox">
-<form action="http://search.lucidimagination.com/p:solr" method="get" class="roundtopsmall">
+<form id="searchform" action="http://search.lucidimagination.com/p:solr" method="get" class="roundtopsmall">
 <input onFocus="getBlank (this, 'Search the site with Solr');" size="25" name="q" id="query" type="text" value="Search the site with Solr">&nbsp; 
-                    <input name="Search" value="Search" type="submit">
+                      <input onclick="selectProvider(this.form)" name="Search" value="Search" type="submit">
+                      @
+                      <select id="searchProvider" name="searchProvider"><option value="any">select provider</option><option value="lucid">Lucid Find</option><option value="sl">Search-Lucene</option></select>
 </form>
-<div style="position: relative; top: -5px; left: -10px">Powered by <a href="http://www.lucidimagination.com" style="color: #033268">Lucid Imagination</a>
-</div>
 </div>
 <!--+
     |end search
@@ -155,6 +155,43 @@ document.write("Last Published: " + docu
 <a href="http://lucene.apache.org/nutch/">Nutch</a>
 </div>
 </div>
+<script type="text/javascript">
+              function selectProvider(form) {
+                provider = form.elements['searchProvider'].value;
+                if (provider == "any") {
+                  if (Math.random() > 0.5) {
+                    provider = "lucid";
+                  } else {
+                    provider = "sl";
+                  }
+                }
+
+                if (provider == "lucid") {
+                  form.action = "http://search.lucidimagination.com/p:solr";
+                } else if (provider == "sl") {
+                  form.action = "http://search-lucene.com/solr";
+                }
+
+                days = 365; // cookie will be valid for a year
+                date = new Date();
+                date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
+                expires = "; expires=" + date.toGMTString();
+                document.cookie = "searchProvider=" + provider + expires + "; path=/";
+              }
+
+              if (document.cookie.length>0) {
+                cStart=document.cookie.indexOf("searchProvider=");
+                if (cStart!=-1) {
+                  cStart=cStart + "searchProvider=".length;
+                  cEnd=document.cookie.indexOf(";", cStart);
+                  if (cEnd==-1) {
+                    cEnd=document.cookie.length;
+                  }
+                  provider = unescape(document.cookie.substring(cStart,cEnd));
+                  document.forms['searchform'].elements['searchProvider'].value = provider;
+                }
+              }
+            </script>
 <div id="credit"></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>

Modified: lucene/dev/branches/bulkpostings/solr/site/mailing_lists.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/site/mailing_lists.html?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/site/mailing_lists.html (original)
+++ lucene/dev/branches/bulkpostings/solr/site/mailing_lists.html Thu Jan 13 02:09:33 2011
@@ -48,12 +48,12 @@
     |start Search
     +-->
 <div class="searchbox">
-<form action="http://search.lucidimagination.com/p:solr" method="get" class="roundtopsmall">
+<form id="searchform" action="http://search.lucidimagination.com/p:solr" method="get" class="roundtopsmall">
 <input onFocus="getBlank (this, 'Search the site with Solr');" size="25" name="q" id="query" type="text" value="Search the site with Solr">&nbsp; 
-                    <input name="Search" value="Search" type="submit">
+                      <input onclick="selectProvider(this.form)" name="Search" value="Search" type="submit">
+                      @
+                      <select id="searchProvider" name="searchProvider"><option value="any">select provider</option><option value="lucid">Lucid Find</option><option value="sl">Search-Lucene</option></select>
 </form>
-<div style="position: relative; top: -5px; left: -10px">Powered by <a href="http://www.lucidimagination.com" style="color: #033268">Lucid Imagination</a>
-</div>
 </div>
 <!--+
     |end search
@@ -155,6 +155,43 @@ document.write("Last Published: " + docu
 <a href="http://lucene.apache.org/nutch/">Nutch</a>
 </div>
 </div>
+<script type="text/javascript">
+              function selectProvider(form) {
+                provider = form.elements['searchProvider'].value;
+                if (provider == "any") {
+                  if (Math.random() > 0.5) {
+                    provider = "lucid";
+                  } else {
+                    provider = "sl";
+                  }
+                }
+
+                if (provider == "lucid") {
+                  form.action = "http://search.lucidimagination.com/p:solr";
+                } else if (provider == "sl") {
+                  form.action = "http://search-lucene.com/solr";
+                }
+
+                days = 365; // cookie will be valid for a year
+                date = new Date();
+                date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
+                expires = "; expires=" + date.toGMTString();
+                document.cookie = "searchProvider=" + provider + expires + "; path=/";
+              }
+
+              if (document.cookie.length>0) {
+                cStart=document.cookie.indexOf("searchProvider=");
+                if (cStart!=-1) {
+                  cStart=cStart + "searchProvider=".length;
+                  cEnd=document.cookie.indexOf(";", cStart);
+                  if (cEnd==-1) {
+                    cEnd=document.cookie.length;
+                  }
+                  provider = unescape(document.cookie.substring(cStart,cEnd));
+                  document.forms['searchform'].elements['searchProvider'].value = provider;
+                }
+              }
+            </script>
 <div id="credit"></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>

Modified: lucene/dev/branches/bulkpostings/solr/site/skin/screen.css
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/site/skin/screen.css?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/site/skin/screen.css (original)
+++ lucene/dev/branches/bulkpostings/solr/site/skin/screen.css Thu Jan 13 02:09:33 2011
@@ -95,7 +95,7 @@ html>body #top .searchbox {
 #top .searchbox {
     position: absolute;
     right: 10px;
-    height: 42px;
+    height: 28px;
     font-size: 70%;
     white-space: nowrap;
     text-align: right;

Modified: lucene/dev/branches/bulkpostings/solr/site/tutorial.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/site/tutorial.html?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/site/tutorial.html (original)
+++ lucene/dev/branches/bulkpostings/solr/site/tutorial.html Thu Jan 13 02:09:33 2011
@@ -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 3.0.0.2010.07.10.11.10.25)</title>
+<title>Solr tutorial (version 4.0.0.2011.01.04.00.08.44)</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">
@@ -48,12 +48,12 @@
     |start Search
     +-->
 <div class="searchbox">
-<form action="http://search.lucidimagination.com/p:solr" method="get" class="roundtopsmall">
+<form id="searchform" action="http://search.lucidimagination.com/p:solr" method="get" class="roundtopsmall">
 <input onFocus="getBlank (this, 'Search the site with Solr');" size="25" name="q" id="query" type="text" value="Search the site with Solr">&nbsp; 
-                    <input name="Search" value="Search" type="submit">
+                      <input onclick="selectProvider(this.form)" name="Search" value="Search" type="submit">
+                      @
+                      <select id="searchProvider" name="searchProvider"><option value="any">select provider</option><option value="lucid">Lucid Find</option><option value="sl">Search-Lucene</option></select>
 </form>
-<div style="position: relative; top: -5px; left: -10px">Powered by <a href="http://www.lucidimagination.com" style="color: #033268">Lucid Imagination</a>
-</div>
 </div>
 <!--+
     |end search
@@ -155,9 +155,46 @@ document.write("Last Published: " + docu
 <a href="http://lucene.apache.org/nutch/">Nutch</a>
 </div>
 </div>
+<script type="text/javascript">
+              function selectProvider(form) {
+                provider = form.elements['searchProvider'].value;
+                if (provider == "any") {
+                  if (Math.random() > 0.5) {
+                    provider = "lucid";
+                  } else {
+                    provider = "sl";
+                  }
+                }
+
+                if (provider == "lucid") {
+                  form.action = "http://search.lucidimagination.com/p:solr";
+                } else if (provider == "sl") {
+                  form.action = "http://search-lucene.com/solr";
+                }
+
+                days = 365; // cookie will be valid for a year
+                date = new Date();
+                date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
+                expires = "; expires=" + date.toGMTString();
+                document.cookie = "searchProvider=" + provider + expires + "; path=/";
+              }
+
+              if (document.cookie.length>0) {
+                cStart=document.cookie.indexOf("searchProvider=");
+                if (cStart!=-1) {
+                  cStart=cStart + "searchProvider=".length;
+                  cEnd=document.cookie.indexOf(";", cStart);
+                  if (cEnd==-1) {
+                    cEnd=document.cookie.length;
+                  }
+                  provider = unescape(document.cookie.substring(cStart,cEnd));
+                  document.forms['searchform'].elements['searchProvider'].value = provider;
+                }
+              }
+            </script>
 <div id="credit">
 <hr>
-      This document is for Apache Solr version 3.0.0.2010.07.10.11.10.25.  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 4.0.0.2011.01.04.00.08.44.  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>
@@ -181,7 +218,7 @@ document.write("Last Published: " + docu
 </div>
 <h1>Solr tutorial</h1>
 <div id="motd-area">
-      This document is for Apache Solr version 3.0.0.2010.07.10.11.10.25.  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 4.0.0.2011.01.04.00.08.44.  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">
@@ -252,14 +289,14 @@ To follow along with this tutorial, you 
 </p>
 <ol>
   
-<li>Java 1.5 or greater.  Some places you can get it are from
+<li>Java 1.6 or greater.  Some places you can get it are from
   <a href="http://java.sun.com/j2se/downloads.html">OpenJDK</a>,
   <a href="http://java.sun.com/j2se/downloads.html">Sun</a>,
   <a href="http://www.ibm.com/developerworks/java/jdk/">IBM</a>, or
   <a href="http://www.oracle.com/technology/products/jrockit/index.html">Oracle</a>.
   <br>
   Running <span class="codefrag">java -version</span> at the command line should indicate a version
-  number starting with 1.5.  Gnu's GCJ is not supported and does not work with Solr.
+  number starting with 1.6.  Gnu's GCJ is not supported and does not work with Solr.
   </li>
   
 <li>A <a href="http://www.apache.org/dyn/closer.cgi/lucene/solr/">Solr release</a>.

Modified: lucene/dev/branches/bulkpostings/solr/site/tutorial.pdf
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/site/tutorial.pdf?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/dev/branches/bulkpostings/solr/site/version_control.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/site/version_control.html?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/site/version_control.html (original)
+++ lucene/dev/branches/bulkpostings/solr/site/version_control.html Thu Jan 13 02:09:33 2011
@@ -48,12 +48,12 @@
     |start Search
     +-->
 <div class="searchbox">
-<form action="http://search.lucidimagination.com/p:solr" method="get" class="roundtopsmall">
+<form id="searchform" action="http://search.lucidimagination.com/p:solr" method="get" class="roundtopsmall">
 <input onFocus="getBlank (this, 'Search the site with Solr');" size="25" name="q" id="query" type="text" value="Search the site with Solr">&nbsp; 
-                    <input name="Search" value="Search" type="submit">
+                      <input onclick="selectProvider(this.form)" name="Search" value="Search" type="submit">
+                      @
+                      <select id="searchProvider" name="searchProvider"><option value="any">select provider</option><option value="lucid">Lucid Find</option><option value="sl">Search-Lucene</option></select>
 </form>
-<div style="position: relative; top: -5px; left: -10px">Powered by <a href="http://www.lucidimagination.com" style="color: #033268">Lucid Imagination</a>
-</div>
 </div>
 <!--+
     |end search
@@ -155,6 +155,43 @@ document.write("Last Published: " + docu
 <a href="http://lucene.apache.org/nutch/">Nutch</a>
 </div>
 </div>
+<script type="text/javascript">
+              function selectProvider(form) {
+                provider = form.elements['searchProvider'].value;
+                if (provider == "any") {
+                  if (Math.random() > 0.5) {
+                    provider = "lucid";
+                  } else {
+                    provider = "sl";
+                  }
+                }
+
+                if (provider == "lucid") {
+                  form.action = "http://search.lucidimagination.com/p:solr";
+                } else if (provider == "sl") {
+                  form.action = "http://search-lucene.com/solr";
+                }
+
+                days = 365; // cookie will be valid for a year
+                date = new Date();
+                date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
+                expires = "; expires=" + date.toGMTString();
+                document.cookie = "searchProvider=" + provider + expires + "; path=/";
+              }
+
+              if (document.cookie.length>0) {
+                cStart=document.cookie.indexOf("searchProvider=");
+                if (cStart!=-1) {
+                  cStart=cStart + "searchProvider=".length;
+                  cEnd=document.cookie.indexOf(";", cStart);
+                  if (cEnd==-1) {
+                    cEnd=document.cookie.length;
+                  }
+                  provider = unescape(document.cookie.substring(cStart,cEnd));
+                  document.forms['searchform'].elements['searchProvider'].value = provider;
+                }
+              }
+            </script>
 <div id="credit"></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>

Modified: lucene/dev/branches/bulkpostings/solr/src/common/org/apache/solr/common/SolrException.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/common/org/apache/solr/common/SolrException.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/common/org/apache/solr/common/SolrException.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/common/org/apache/solr/common/SolrException.java Thu Jan 13 02:09:33 2011
@@ -93,43 +93,6 @@ public class SolrException extends Runti
     this.code=code;
   }
   
-  /**
-   * @deprecated Use {@link #SolrException(ErrorCode,String,boolean)}.
-   */
-  @Deprecated
-  public SolrException(int code, String msg, boolean alreadyLogged) {
-    super(msg);
-    this.code=code;
-    this.logged=alreadyLogged;
-  }
-
-  /**
-   * @deprecated Use {@link #SolrException(ErrorCode,String,Throwable,boolean)}.
-   */
-  @Deprecated
-  public SolrException(int code, String msg, Throwable th, boolean alreadyLogged) {
-    super(msg,th);
-    this.code=code;
-    logged=alreadyLogged;
-  }
-
-  /**
-   * @deprecated Use {@link #SolrException(ErrorCode,String,Throwable)}.
-   */
-  @Deprecated
-  public SolrException(int code, String msg, Throwable th) {
-    this(code,msg,th,true);
-  }
-
-  /**
-   * @deprecated Use {@link #SolrException(ErrorCode,Throwable)}.
-   */
-  @Deprecated
-  public SolrException(int code, Throwable th) {
-    super(th);
-    this.code=code;
-    logged=true;
-  }
 
   int code=0;
   public int code() { return code; }

Modified: lucene/dev/branches/bulkpostings/solr/src/common/org/apache/solr/common/params/SolrParams.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/common/org/apache/solr/common/params/SolrParams.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/common/org/apache/solr/common/params/SolrParams.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/common/org/apache/solr/common/params/SolrParams.java Thu Jan 13 02:09:33 2011
@@ -249,16 +249,6 @@ public abstract class SolrParams impleme
     }
   }
 
-  
-  /** how to transform a String into a boolean... more flexible than
-   * Boolean.parseBoolean() to enable easier integration with html forms.
-   * @deprecated Use org.apache.solr.common.util.StrUtils.parseBool
-   */
-  @Deprecated
-  protected boolean parseBool(String s) {
-    return StrUtils.parseBool(s);
-  }
-
   /** Create a Map<String,String> from a NamedList given no keys are repeated */
   public static Map<String,String> toMap(NamedList params) {
     HashMap<String,String> map = new HashMap<String,String>();

Modified: lucene/dev/branches/bulkpostings/solr/src/common/org/apache/solr/common/util/ConcurrentLRUCache.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/common/org/apache/solr/common/util/ConcurrentLRUCache.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/common/org/apache/solr/common/util/ConcurrentLRUCache.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/common/org/apache/solr/common/util/ConcurrentLRUCache.java Thu Jan 13 02:09:33 2011
@@ -20,6 +20,8 @@ import org.apache.lucene.util.PriorityQu
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.Arrays;
+import java.util.Collections;
 import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.TreeSet;
@@ -182,6 +184,7 @@ public class ConcurrentLRUCache<K,V> {
       int wantToKeep = lowerWaterMark;
       int wantToRemove = sz - lowerWaterMark;
 
+      @SuppressWarnings("unchecked") // generic array's are anoying
       CacheEntry<K,V>[] eset = new CacheEntry[sz];
       int eSize = 0;
 
@@ -280,7 +283,7 @@ public class ConcurrentLRUCache<K,V> {
         wantToKeep = lowerWaterMark - numKept;
         wantToRemove = sz - lowerWaterMark - numRemoved;
 
-        PQueue queue = new PQueue(wantToRemove);
+        PQueue<K,V> queue = new PQueue<K,V>(wantToRemove);
 
         for (int i=eSize-1; i>=0; i--) {
           CacheEntry<K,V> ce = eset[i];
@@ -331,9 +334,8 @@ public class ConcurrentLRUCache<K,V> {
 
         // Now delete everything in the priority queue.
         // avoid using pop() since order doesn't matter anymore
-        for (Object o : queue.getValues()) {
-          if (o==null) continue;
-          CacheEntry<K,V> ce = (CacheEntry)o;
+        for (CacheEntry<K,V> ce : queue.getValues()) {
+          if (ce==null) continue;
           evictEntry(ce.key);
           numRemoved++;
         }
@@ -349,27 +351,29 @@ public class ConcurrentLRUCache<K,V> {
     }
   }
 
-  private static class PQueue extends PriorityQueue {
+  private static class PQueue<K,V> extends PriorityQueue<CacheEntry<K,V>> {
     int myMaxSize;
     PQueue(int maxSz) {
       super.initialize(maxSz);
       myMaxSize = maxSz;
     }
 
-    Object[] getValues() { return heap; }
+    Iterable<CacheEntry<K,V>> getValues() { 
+      return Collections.unmodifiableCollection(Arrays.asList(heap));
+    }
 
-    protected boolean lessThan(Object a, Object b) {
+    protected boolean lessThan(CacheEntry a, CacheEntry b) {
       // reverse the parameter order so that the queue keeps the oldest items
-      return ((CacheEntry)b).lastAccessedCopy < ((CacheEntry)a).lastAccessedCopy;
+      return b.lastAccessedCopy < a.lastAccessedCopy;
     }
 
     // necessary because maxSize is private in base class
-    public Object myInsertWithOverflow(Object element) {
+    public CacheEntry<K,V> myInsertWithOverflow(CacheEntry<K,V> element) {
       if (size() < myMaxSize) {
         add(element);
         return null;
       } else if (size() > 0 && !lessThan(element, heap[1])) {
-        Object ret = heap[1];
+        CacheEntry<K,V> ret = heap[1];
         heap[1] = element;
         updateTop();
         return ret;
@@ -400,11 +404,11 @@ public class ConcurrentLRUCache<K,V> {
     Map<K, V> result = new LinkedHashMap<K, V>();
     if (n <= 0)
       return result;
-    TreeSet<CacheEntry> tree = new TreeSet<CacheEntry>();
+    TreeSet<CacheEntry<K,V>> tree = new TreeSet<CacheEntry<K,V>>();
     markAndSweepLock.lock();
     try {
       for (Map.Entry<Object, CacheEntry<K,V>> entry : map.entrySet()) {
-        CacheEntry ce = entry.getValue();
+        CacheEntry<K,V> ce = entry.getValue();
         ce.lastAccessedCopy = ce.lastAccessed;
         if (tree.size() < n) {
           tree.add(ce);
@@ -418,7 +422,7 @@ public class ConcurrentLRUCache<K,V> {
     } finally {
       markAndSweepLock.unlock();
     }
-    for (CacheEntry<K, V> e : tree) {
+    for (CacheEntry<K,V> e : tree) {
       result.put(e.key, e.value);
     }
     return result;
@@ -428,7 +432,7 @@ public class ConcurrentLRUCache<K,V> {
     Map<K,V> result = new LinkedHashMap<K,V>();
     if (n <= 0)
       return result;
-    TreeSet<CacheEntry> tree = new TreeSet<CacheEntry>();
+    TreeSet<CacheEntry<K,V>> tree = new TreeSet<CacheEntry<K,V>>();
     // we need to grab the lock since we are changing lastAccessedCopy
     markAndSweepLock.lock();
     try {

Modified: lucene/dev/branches/bulkpostings/solr/src/common/org/apache/solr/common/util/JavaBinCodec.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/common/org/apache/solr/common/util/JavaBinCodec.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/common/org/apache/solr/common/util/JavaBinCodec.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/common/org/apache/solr/common/util/JavaBinCodec.java Thu Jan 13 02:09:33 2011
@@ -102,9 +102,9 @@ public class JavaBinCodec {
   }
 
 
-  public SimpleOrderedMap readOrderedMap(FastInputStream dis) throws IOException {
+  public SimpleOrderedMap<Object> readOrderedMap(FastInputStream dis) throws IOException {
     int sz = readSize(dis);
-    SimpleOrderedMap nl = new SimpleOrderedMap();
+    SimpleOrderedMap<Object> nl = new SimpleOrderedMap<Object>();
     for (int i = 0; i < sz; i++) {
       String name = (String) readVal(dis);
       Object val = readVal(dis);
@@ -113,9 +113,9 @@ public class JavaBinCodec {
     return nl;
   }
 
-  public NamedList readNamedList(FastInputStream dis) throws IOException {
+  public NamedList<Object> readNamedList(FastInputStream dis) throws IOException {
     int sz = readSize(dis);
-    NamedList nl = new NamedList();
+    NamedList<Object> nl = new NamedList<Object>();
     for (int i = 0; i < sz; i++) {
       String name = (String) readVal(dis);
       Object val = readVal(dis);
@@ -124,7 +124,7 @@ public class JavaBinCodec {
     return nl;
   }
 
-  public void writeNamedList(NamedList nl) throws IOException {
+  public void writeNamedList(NamedList<?> nl) throws IOException {
     writeTag(nl instanceof SimpleOrderedMap ? ORDERED_MAP : NAMED_LST, nl.size());
     for (int i = 0; i < nl.size(); i++) {
       String name = nl.getName(i);
@@ -218,7 +218,7 @@ public class JavaBinCodec {
   public boolean writeKnownType(Object val) throws IOException {
     if (writePrimitive(val)) return true;
     if (val instanceof NamedList) {
-      writeNamedList((NamedList) val);
+      writeNamedList((NamedList<?>) val);
       return true;
     }
     if (val instanceof SolrDocumentList) { // SolrDocumentList is a List, so must come before List check
@@ -336,7 +336,8 @@ public class JavaBinCodec {
     solrDocs.setStart((Long) list.get(1));
     solrDocs.setMaxScore((Float) list.get(2));
 
-    List l = (List) readVal(dis);
+    @SuppressWarnings("unchecked")
+    List<SolrDocument> l = (List<SolrDocument>) readVal(dis);
     solrDocs.addAll(l);
     return solrDocs;
   }
@@ -344,7 +345,7 @@ public class JavaBinCodec {
   public void writeSolrDocumentList(SolrDocumentList docs)
           throws IOException {
     writeTag(SOLRDOCLST);
-    List l = new ArrayList(3);
+    List<Number> l = new ArrayList<Number>(3);
     l.add(docs.getNumFound());
     l.add(docs.getStart());
     l.add(docs.getMaxScore());
@@ -352,10 +353,10 @@ public class JavaBinCodec {
     writeArray(docs);
   }
 
-  public Map readMap(FastInputStream dis)
+  public Map<Object,Object> readMap(FastInputStream dis)
           throws IOException {
     int sz = readVInt(dis);
-    Map m = new LinkedHashMap();
+    Map<Object,Object> m = new LinkedHashMap<Object,Object>();
     for (int i = 0; i < sz; i++) {
       Object key = readVal(dis);
       Object val = readVal(dis);
@@ -373,8 +374,8 @@ public class JavaBinCodec {
     writeVal(END_OBJ);
   }
 
-  public List readIterator(FastInputStream fis) throws IOException {
-    ArrayList l = new ArrayList();
+  public List<Object> readIterator(FastInputStream fis) throws IOException {
+    ArrayList<Object> l = new ArrayList<Object>();
     while (true) {
       Object o = readVal(fis);
       if (o == END_OBJ) break;
@@ -406,9 +407,9 @@ public class JavaBinCodec {
     }
   }
 
-  public List readArray(FastInputStream dis) throws IOException {
+  public List<Object> readArray(FastInputStream dis) throws IOException {
     int sz = readSize(dis);
-    ArrayList l = new ArrayList(sz);
+    ArrayList<Object> l = new ArrayList<Object>(sz);
     for (int i = 0; i < sz; i++) {
       l.add(readVal(dis));
     }
@@ -603,10 +604,9 @@ public class JavaBinCodec {
   }
 
 
-  public void writeMap(Map val)
-          throws IOException {
+  public void writeMap(Map<?,?> val) throws IOException {
     writeTag(MAP, val.size());
-    for (Map.Entry entry : (Set<Map.Entry>) val.entrySet()) {
+    for (Map.Entry<?,?> entry : val.entrySet()) {
       Object key = entry.getKey();
       if (key instanceof String) {
         writeExternString((String) key);

Modified: lucene/dev/branches/bulkpostings/solr/src/common/org/apache/solr/common/util/NamedList.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/common/org/apache/solr/common/util/NamedList.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/common/org/apache/solr/common/util/NamedList.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/common/org/apache/solr/common/util/NamedList.java Thu Jan 13 02:09:33 2011
@@ -50,11 +50,11 @@ import java.io.Serializable;
  * @version $Id$
  */
 public class NamedList<T> implements Cloneable, Serializable, Iterable<Map.Entry<String,T>> {
-  protected final List nvPairs;
+  protected final List<Object> nvPairs;
 
   /** Creates an empty instance */
   public NamedList() {
-    nvPairs = new ArrayList();
+    nvPairs = new ArrayList<Object>();
   }
 
 
@@ -88,7 +88,7 @@ public class NamedList<T> implements Clo
    * @deprecated Use {@link #NamedList(java.util.Map.Entry[])} for the NamedList instantiation
    */
   @Deprecated
-  public NamedList(List nameValuePairs) {
+  public NamedList(List<Object> nameValuePairs) {
     nvPairs=nameValuePairs;
   }
 
@@ -104,8 +104,8 @@ public class NamedList<T> implements Clo
    * @see https://issues.apache.org/jira/browse/SOLR-912
    */
   @Deprecated
-  private List  nameValueMapToList(Map.Entry<String, ? extends T>[] nameValuePairs) {
-    List result = new ArrayList();
+  private List<Object> nameValueMapToList(Map.Entry<String, ? extends T>[] nameValuePairs) {
+    List<Object> result = new ArrayList<Object>();
     for (Map.Entry<String, ?> ent : nameValuePairs) {
       result.add(ent.getKey());
       result.add(ent.getValue());
@@ -158,6 +158,7 @@ public class NamedList<T> implements Clo
    */
   public T setVal(int idx, T val) {
     int index = (idx<<1)+1;
+    @SuppressWarnings("unchecked")
     T old = (T)nvPairs.get( index );
     nvPairs.set(index, val);
     return old;
@@ -170,7 +171,9 @@ public class NamedList<T> implements Clo
   public T remove(int idx) {
     int index = (idx<<1);
     nvPairs.remove(index);
-    return (T)nvPairs.remove(index);  // same index, as things shifted in previous remove
+    @SuppressWarnings("unchecked")
+    T result = (T)nvPairs.remove(index);  // same index, as things shifted in previous remove
+    return result;
   }
 
   /**
@@ -315,7 +318,7 @@ public class NamedList<T> implements Clo
    * Makes a <i>shallow copy</i> of the named list.
    */
   public NamedList<T> clone() {
-    ArrayList newList = new ArrayList(nvPairs.size());
+    ArrayList<Object> newList = new ArrayList<Object>(nvPairs.size());
     newList.addAll(nvPairs);
     return new NamedList<T>(newList);
   }
@@ -330,7 +333,7 @@ public class NamedList<T> implements Clo
    */
   public Iterator<Map.Entry<String,T>> iterator() {
 
-    final NamedList list = this;
+    final NamedList<T> list = this;
 
     Iterator<Map.Entry<String,T>> iter = new Iterator<Map.Entry<String,T>>() {
 
@@ -349,7 +352,7 @@ public class NamedList<T> implements Clo
 
           @SuppressWarnings("unchecked")
           public T getValue() {
-            return (T)list.getVal( index );
+            return list.getVal( index );
           }
 
           public String toString()
@@ -358,7 +361,7 @@ public class NamedList<T> implements Clo
           }
 
     		  public T setValue(T value) {
-    		    return (T) list.setVal(index, value);
+            return list.setVal(index, value);
     		  }
         };
         return nv;

Modified: lucene/dev/branches/bulkpostings/solr/src/common/org/apache/solr/common/util/SimpleOrderedMap.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/common/org/apache/solr/common/util/SimpleOrderedMap.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/common/org/apache/solr/common/util/SimpleOrderedMap.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/common/org/apache/solr/common/util/SimpleOrderedMap.java Thu Jan 13 02:09:33 2011
@@ -50,7 +50,7 @@ public class SimpleOrderedMap<T> extends
    * @param nameValuePairs underlying List which should be used to implement a SimpleOrderedMap; modifying this List will affect the SimpleOrderedMap.
    */
   @Deprecated
-  public SimpleOrderedMap(List nameValuePairs) {
+  public SimpleOrderedMap(List<Object> nameValuePairs) {
     super(nameValuePairs);
   }
   
@@ -60,7 +60,7 @@ public class SimpleOrderedMap<T> extends
 
   @Override
   public SimpleOrderedMap<T> clone() {
-    ArrayList newList = new ArrayList(nvPairs.size());
+    ArrayList<Object> newList = new ArrayList<Object>(nvPairs.size());
     newList.addAll(nvPairs);
     return new SimpleOrderedMap<T>(newList);
   }