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

svn commit: r1054507 [2/9] - in /lucene/dev/branches/realtime_search: ./ 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/con...

Modified: lucene/dev/branches/realtime_search/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/build.xml?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/build.xml (original)
+++ lucene/dev/branches/realtime_search/build.xml Mon Jan  3 00:30:27 2011
@@ -52,6 +52,100 @@
     </sequential>
   </target>
 
+  <target name="eclipse" description="Setup Eclipse configuration">
+    <copy file="dev-tools/eclipse/dot.classpath" tofile=".classpath" overwrite="true"/>
+    <mkdir dir=".settings"/>
+    <copy file="dev-tools/eclipse/resources.prefs" 
+          tofile=".settings/org.eclipse.core.resources.prefs" overwrite="true"/>
+    <echo>Running Lucene contrib db/bdb-je task 'get-je-jar' ...</echo>
+    <subant target="get-je-jar">
+      <fileset dir="lucene/contrib/db/bdb-je" includes="build.xml" />
+    </subant>
+    <echo>Running Lucene contrib db/bdb task 'get-db-jar' ...</echo>
+    <subant target="get-db-jar">
+      <fileset dir="lucene/contrib/db/bdb" includes="build.xml" />
+    </subant>
+    <echo>
+      SUCCESS: You must right-click your project and choose Refresh
+    </echo>
+  </target>
+
+  <condition property="isMac"><os family="mac"/></condition>
+  <condition property="isUnix"><os family="unix"/></condition>
+  <condition property="isWindows"><os family="windows"/></condition>
+  <property environment="env"/>
+  <target name="idea" depends="copy-idea-files,finish-idea-setup-windows,
+                               finish-idea-setup-mac,
+                               finish-idea-setup-unix"/>
+  <target name="copy-idea-files" 
+          description="Setup IntelliJ IDEA configuration files">
+    <copy todir=".">
+      <fileset dir="dev-tools/idea">
+        <exclude name="Intellij-Lucene-Codestyle.xml"/>
+      </fileset>
+    </copy>
+    <echo>Running Lucene contrib db/bdb-je task 'get-je-jar' ...</echo>
+    <subant target="get-je-jar">
+      <fileset dir="lucene/contrib/db/bdb-je" includes="build.xml" />
+    </subant>
+    <echo>Running Lucene contrib db/bdb task 'get-db-jar' ...</echo>
+    <subant target="get-db-jar">
+      <fileset dir="lucene/contrib/db/bdb" includes="build.xml" />
+    </subant>
+  </target>
+  <target name="finish-idea-setup-windows" if="isWindows">
+    <echo>
+      To install the Lucene/Solr codestyle file, copy
+      dev-tools\idea\Intellij-Lucene-Codestyle.xml to
+      ${env.HOMEDRIVE}${env.HOMEPATH}\.IntelliJIdeaXX\config\codestyles\
+      where "XX" is "90" for IntelliJ 9.0.X, "10" for 10.0.X, etc.
+      After restarting IntelliJ, select "Lucene"
+      from the dropdown list at:
+      Settings | Code Style | Use global settings | Scheme name
+
+      To complete IntelliJ IDEA setup, you must manually configure
+      Project Structure | Project | Project SDK.
+    </echo>
+  </target>
+  <target name="finish-idea-setup-mac" if="isMac">
+    <echo>
+      To install the Lucene/Solr codestyle file, copy
+      dev-tools/idea/Intellij-Lucene-Codestyle.xml to
+      ~/Library/Preferences/IntelliJXX/codestyles/
+      where "XX" is "90" for IntelliJ 9.0.X, "10" for 10.0.X, etc.
+      After restarting IntelliJ, select "Lucene"
+      from the dropdown list at:
+      Settings | Code Style | Use global settings | Scheme name
+
+      To complete IntelliJ IDEA setup, you must manually configure
+      Project Structure | Project | Project SDK.
+    </echo>
+  </target>
+  <target name="finish-idea-setup-unix" if="isUnix">
+    <echo>
+      To install the Lucene/Solr codestyle file, copy
+      dev-tools/idea/Intellij-Lucene-Codestyle.xml to
+      ~/.IntelliJIdeaXX/config/codestyles/
+      where "XX" is "90" for IntelliJ 9.0.X, "10" for 10.0.X, etc.
+      After restarting IntelliJ, select "Lucene"
+      from the dropdown list at:
+      Settings | Code Style | Use global settings | Scheme name
+
+      To complete IntelliJ IDEA setup, you must manually configure
+      Project Structure | Project | Project SDK.
+    </echo>
+  </target> 
+  <target name="clean-idea" 
+          description="Removes all IntelliJ IDEA configuration files">
+    <delete dir=".idea" failonerror="true"/>
+    <delete failonerror="true">
+      <fileset dir="." includes="*.iml,*.ipr,*.iws"/>
+      <fileset dir="solr" includes="**/*.iml"/>
+      <fileset dir="lucene" includes="**/*.iml"/>
+      <fileset dir="modules" includes="**/*.iml"/>
+    </delete>
+  </target>
+
   <target name="clean" description="Clean Lucene and Solr">
     <delete dir="dist" />
     <sequential>

Modified: lucene/dev/branches/realtime_search/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/CHANGES.txt?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/CHANGES.txt (original)
+++ lucene/dev/branches/realtime_search/lucene/CHANGES.txt Mon Jan  3 00:30:27 2011
@@ -121,8 +121,8 @@ Changes in backwards compatibility polic
 
 Changes in Runtime Behavior
 
-* LUCENE-2650: The behavior of FSDirectory.open has changed. On 64-bit
-  Windows systems that support unmapping, FSDirectory.open returns
+* LUCENE-2650, LUCENE-2825: The behavior of FSDirectory.open has changed. On 64-bit
+  Windows and Solaris systems that support unmapping, FSDirectory.open returns
   MMapDirectory. Additionally the behavior of MMapDirectory has been
   changed to enable unmapping by default if supported by the JRE.
   (Mike McCandless, Uwe Schindler, Robert Muir)
@@ -134,7 +134,7 @@ Changes in Runtime Behavior
 * LUCENE-2805: IndexWriter now increments the index version on every change to
   the index instead of for every commit. Committing or closing the IndexWriter
   without any changes to the index will not cause any index version increment.
-  (Simon Willnauer, Mike Mccandless)
+  (Simon Willnauer, Mike McCandless)
 
 API Changes
 
@@ -298,7 +298,7 @@ New features
 
 * LUCENE-995: The QueryParser now interprets * as an open end for range
   queries.  Literal asterisks may be represented by quoting or escaping
-  (i.e. \* or "*")  Custom QueryParser sublcasses overriding getRangeQuery()
+  (i.e. \* or "*")  Custom QueryParser subclasses overriding getRangeQuery()
   will be passed null for any open endpoint. (Adriano Crestani, yonik)
 
 * LUCENE-2742: Add native per-field codec support. CodecProvider lets you now
@@ -324,7 +324,7 @@ Optimizations
   efficient copying by sub-classes. Optimized copy is implemented for RAM and FS
   streams. (Shai Erera)
 
-* LUCENE-2588: Don't store unecessary suffixes when writing the terms
+* LUCENE-2588: Don't store unnecessary suffixes when writing the terms
   index, saving RAM in IndexReader; change default terms index
   interval from 128 to 32, because the terms index now requires much
   less RAM.  (Robert Muir, Mike McCandless)
@@ -360,7 +360,7 @@ Bug fixes
 Changes in backwards compatibility policy
 
 * LUCENE-2719: Changed API of internal utility class
-  org.apche.lucene.util.SorterTemplate to support faster quickSort using
+  org.apache.lucene.util.SorterTemplate to support faster quickSort using
   pivot values and also merge sort and insertion sort. If you have used
   this class, you have to implement two more methods for handling pivots.
   (Uwe Schindler, Robert Muir, Mike McCandless)
@@ -632,7 +632,7 @@ New features
 
 * LUCENE-2314: Added AttributeSource.copyTo(AttributeSource) that
   allows to use cloneAttributes() and this method as a replacement
-  for captureState()/restoreState(), if the state itsself
+  for captureState()/restoreState(), if the state itself
   needs to be inspected/modified.  (Uwe Schindler)
 
 * LUCENE-2293: Expose control over max number of threads that
@@ -678,6 +678,12 @@ New features
   Using this wrapper its easy to add fuzzy/wildcard to e.g. a SpanNearQuery.
   (Robert Muir, Uwe Schindler)
   
+* LUCENE-2838: ConstantScoreQuery now directly supports wrapping a Query
+  instance for stripping off scores. The use of a QueryWrapperFilter
+  is no longer needed and discouraged for that use case. Directly wrapping
+  Query improves performance, as out-of-order collection is now supported.
+  (Uwe Schindler)
+  
 Optimizations
 
 * LUCENE-2075: Terms dict cache is now shared across threads instead
@@ -689,7 +695,7 @@ Optimizations
 
 * LUCENE-2136: If the multi reader (DirectoryReader or MultiReader)
   only has a single sub-reader, delegate all enum requests to it.
-  This avoid the overhead of using a PQ unecessarily.  (Mike
+  This avoid the overhead of using a PQ unnecessarily.  (Mike
   McCandless)
 
 * LUCENE-2137: Switch to AtomicInteger for some ref counting (Earwin
@@ -743,7 +749,7 @@ Optimizations
   cases.  (Mike McCandless)
 
 * LUCENE-2719: Improved TermsHashPerField's sorting to use a better
-  quick sort algorithm that dereferences the privot element not on
+  quick sort algorithm that dereferences the pivot element not on
   every compare call. Also replaced lots of sorting code in Lucene
   by the improved SorterTemplate class.
   (Uwe Schindler, Robert Muir, Mike McCandless)
@@ -771,17 +777,21 @@ Build
 
 * LUCENE-1709: Tests are now parallelized by default (except for benchmark). You
   can force them to run sequentially by passing -Drunsequential=1 on the command
-  line. The number of threads that are spwaned per CPU defaults to '1'. If you 
+  line. The number of threads that are spawned per CPU defaults to '1'. If you 
   wish to change that, you can run the tests with -DthreadsPerProcessor=[num].
   (Robert Muir, Shai Erera, Peter Kofler)
 
 * LUCENE-2516: Backwards tests are now compiled against released lucene-core.jar
   from tarball of previous version. Backwards tests are now packaged together
   with src distribution.  (Uwe Schindler)
+  
+* LUCENE-2611: Added Ant target to install IntelliJ IDEA configuration:
+  "ant idea".  See http://wiki.apache.org/lucene-java/HowtoConfigureIntelliJ
+  (Steven Rowe)
 
 Test Cases
 
-* LUCENE-2037 Allow Junit4 tests in our envrionment (Erick Erickson
+* LUCENE-2037 Allow Junit4 tests in our environment (Erick Erickson
   via Mike McCandless)
 
 * LUCENE-1844: Speed up the unit tests (Mark Miller, Erick Erickson,
@@ -803,14 +813,14 @@ Test Cases
 * LUCENE-2313, LUCENE-2322: Add VERBOSE to LuceneTestCase(J4) to control
   verbosity of tests. If VERBOSE==false (default) tests should not print
   anything other than errors to System.(out|err). The setting can be
-  changed with -Dtests.verbose=true on test invokation.
+  changed with -Dtests.verbose=true on test invocation.
   (Shai Erera, Paul Elschot, Uwe Schindler)
 
 * LUCENE-2318: Remove inconsistent system property code for retrieving
   temp and data directories inside test cases. It is now centralized in
   LuceneTestCase(J4). Also changed lots of tests to use
   getClass().getResourceAsStream() to retrieve test data. Tests needing
-  access to "real" files from the test folder itsself, can use
+  access to "real" files from the test folder itself, can use
   LuceneTestCase(J4).getDataFile().  (Uwe Schindler)
 
 * LUCENE-2398, LUCENE-2611: Improve tests to work better from IDEs such 

Modified: lucene/dev/branches/realtime_search/lucene/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/build.xml?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/build.xml (original)
+++ lucene/dev/branches/realtime_search/lucene/build.xml Mon Jan  3 00:30:27 2011
@@ -31,6 +31,7 @@
   <path id="test.classpath">
   	<path refid="classpath"/>
     <path refid="junit-path"/>
+    <path refid="ant-path"/>
     <pathelement location="${build.dir}/classes/test"/>
   </path>
 
@@ -67,6 +68,7 @@
 
   <path id="backwards.test.compile.classpath">
     <path refid="junit-path"/>
+    <path refid="ant-path"/>
     <fileset dir="${backwards.dir}/lib">
       <include name="lucene-core*.jar"/>
     </fileset>

Modified: lucene/dev/branches/realtime_search/lucene/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/common-build.xml?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/common-build.xml (original)
+++ lucene/dev/branches/realtime_search/lucene/common-build.xml Mon Jan  3 00:30:27 2011
@@ -53,6 +53,10 @@
     <pathelement location="${junit-location.jar}"/>
   </path>
 
+  <path id="ant-path">
+    <fileset dir="${common.dir}/lib" includes="ant-*.jar"/>
+  </path>
+
   <!-- default arguments to pass to JVM executing tests -->
   <property name="testmethod" value=""/>
   <property name="args" value=""/>
@@ -71,7 +75,6 @@
   <property name="tests.linedocsfile" value="europarl.lines.txt.gz" />
   <property name="tests.iter" value="1" />
   <property name="tests.seed" value="random" />
-  <property name="tests.userdir" value="."/>
   <property name="tests.loggingfile" value="/dev/null"/>
   <property name="tests.nightly" value="false" />
     
@@ -81,6 +84,9 @@
   <property name="javac.target" value="1.5"/>
   <property name="javac.source.backwards" value="1.5"/>
   <property name="javac.target.backwards" value="1.5"/>
+  <!-- clover wants to run with -lib, otherwise we prefer a repeatable
+       classpath -->
+  <property name="javac.includeAntRuntime" value="${run.clover}"/>
 
   <property name="javadoc.link" value="http://java.sun.com/j2se/1.5/docs/api/"/>
   <property name="javadoc.access" value="protected"/>
@@ -441,7 +447,7 @@
 	    -->
     	<touch file="@{tempDir}/@{threadNum}/quiet.ant" verbose="false" mkdirs="true"/>
 	    <junit printsummary="off" haltonfailure="no" maxmemory="512M" tempdir="@{tempDir}/@{threadNum}"
-	      errorProperty="tests.failed" failureProperty="tests.failed" forkmode="perBatch" dir="${tests.userdir}">
+	      errorProperty="tests.failed" failureProperty="tests.failed" forkmode="perBatch" dir="@{tempDir}/@{threadNum}">
 	      <classpath refid="@{junit.classpath}"/>
 	      <assertions>
 	        <enable package="org.apache.lucene"/>
@@ -655,6 +661,7 @@
     <sequential>
       <mkdir dir="@{destdir}"/>
       <javac
+        includeAntRuntime="${javac.includeAntRuntime}"
         encoding="${build.encoding}"
         srcdir="@{srcdir}"
         destdir="@{destdir}"

Modified: lucene/dev/branches/realtime_search/lucene/contrib/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/contrib/CHANGES.txt?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/contrib/CHANGES.txt (original)
+++ lucene/dev/branches/realtime_search/lucene/contrib/CHANGES.txt Mon Jan  3 00:30:27 2011
@@ -287,6 +287,8 @@ Build
 
  * LUCENE-2797: Upgrade contrib/icu's ICU jar file to ICU 4.6  
    (Robert Muir)
+
+ * LUCENE-2833: Upgrade contrib/ant's jtidy jar file to r938 (Robert Muir)
    
 Optimizations
 

Modified: lucene/dev/branches/realtime_search/lucene/contrib/ant/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/contrib/ant/build.xml?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/contrib/ant/build.xml (original)
+++ lucene/dev/branches/realtime_search/lucene/contrib/ant/build.xml Mon Jan  3 00:30:27 2011
@@ -25,7 +25,7 @@
 
   <path id="additional.dependencies">
     <!-- TODO: make ${tidy.jar} property -->
-    <pathelement location="lib/Tidy.jar"/>
+    <fileset dir="lib" includes="jtidy-*.jar"/>
   </path>
 
   <pathconvert property="project.classpath"
@@ -33,6 +33,8 @@
                refid="additional.dependencies"
   />
 
+  <property name="javac.includeAntRuntime" value="true"/>
+
   <import file="../contrib-build.xml"/>
 	
   <module-uptodate name="analysis/common" jarfile="${common.dir}/../modules/analysis/build/common/lucene-analyzers-common-${version}.jar"

Modified: lucene/dev/branches/realtime_search/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DemoHTMLParser.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DemoHTMLParser.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DemoHTMLParser.java (original)
+++ lucene/dev/branches/realtime_search/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DemoHTMLParser.java Mon Jan  3 00:30:27 2011
@@ -19,7 +19,6 @@ package org.apache.lucene.benchmark.byTa
 
 import java.io.IOException;
 import java.io.Reader;
-import java.io.StringReader;
 import java.text.DateFormat;
 import java.text.ParseException;
 import java.util.Date;

Modified: lucene/dev/branches/realtime_search/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchWithCollectorTask.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchWithCollectorTask.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchWithCollectorTask.java (original)
+++ lucene/dev/branches/realtime_search/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchWithCollectorTask.java Mon Jan  3 00:30:27 2011
@@ -22,8 +22,6 @@ import org.apache.lucene.benchmark.byTas
 import org.apache.lucene.search.Collector;
 import org.apache.lucene.search.TopScoreDocCollector;
 
-import java.io.IOException;
-
 /**
  * Does search w/ a custom collector
  */

Modified: lucene/dev/branches/realtime_search/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/CreateIndexTaskTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/CreateIndexTaskTest.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/CreateIndexTaskTest.java (original)
+++ lucene/dev/branches/realtime_search/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/CreateIndexTaskTest.java Mon Jan  3 00:30:27 2011
@@ -19,20 +19,15 @@ package org.apache.lucene.benchmark.byTa
 
 import java.io.ByteArrayOutputStream;
 import java.io.File;
-import java.io.IOException;
 import java.io.PrintStream;
 import java.util.Properties;
 
 import org.apache.lucene.benchmark.BenchmarkTestCase;
 import org.apache.lucene.benchmark.byTask.PerfRunData;
 import org.apache.lucene.benchmark.byTask.utils.Config;
-import org.apache.lucene.index.CorruptIndexException;
-import org.apache.lucene.index.IndexWriter;
-import org.apache.lucene.index.IndexWriterConfig.OpenMode;
 import org.apache.lucene.index.NoDeletionPolicy;
 import org.apache.lucene.index.NoMergePolicy;
 import org.apache.lucene.index.NoMergeScheduler;
-import org.apache.lucene.store.LockObtainFailedException;
 import org.apache.lucene.util.Version;
 
 

Modified: lucene/dev/branches/realtime_search/lucene/contrib/demo/src/java/org/apache/lucene/demo/FileDocument.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/contrib/demo/src/java/org/apache/lucene/demo/FileDocument.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/contrib/demo/src/java/org/apache/lucene/demo/FileDocument.java (original)
+++ lucene/dev/branches/realtime_search/lucene/contrib/demo/src/java/org/apache/lucene/demo/FileDocument.java Mon Jan  3 00:30:27 2011
@@ -19,7 +19,6 @@ package org.apache.lucene.demo;
 
 import java.io.File;
 import java.io.FileInputStream;
-import java.io.FileReader;
 import java.io.InputStreamReader;
 
 import org.apache.lucene.document.DateTools;

Modified: lucene/dev/branches/realtime_search/lucene/contrib/demo/src/java/org/apache/lucene/demo/SearchFiles.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/contrib/demo/src/java/org/apache/lucene/demo/SearchFiles.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/contrib/demo/src/java/org/apache/lucene/demo/SearchFiles.java (original)
+++ lucene/dev/branches/realtime_search/lucene/contrib/demo/src/java/org/apache/lucene/demo/SearchFiles.java Mon Jan  3 00:30:27 2011
@@ -20,7 +20,6 @@ package org.apache.lucene.demo;
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileInputStream;
-import java.io.FileReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.util.Date;

Modified: lucene/dev/branches/realtime_search/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedDocsAndPositionsEnum.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedDocsAndPositionsEnum.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedDocsAndPositionsEnum.java (original)
+++ lucene/dev/branches/realtime_search/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedDocsAndPositionsEnum.java Mon Jan  3 00:30:27 2011
@@ -19,7 +19,6 @@ package org.apache.lucene.store.instanti
 import org.apache.lucene.index.DocsAndPositionsEnum;
 import org.apache.lucene.util.Bits;
 import org.apache.lucene.util.BytesRef;
-import java.util.Arrays;
 
 public class InstantiatedDocsAndPositionsEnum extends DocsAndPositionsEnum {
   private int upto;

Modified: lucene/dev/branches/realtime_search/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndexWriter.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndexWriter.java (original)
+++ lucene/dev/branches/realtime_search/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndexWriter.java Mon Jan  3 00:30:27 2011
@@ -39,7 +39,6 @@ import org.apache.lucene.analysis.TokenS
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Fieldable;
 import org.apache.lucene.index.IndexReader;
-import org.apache.lucene.index.IndexWriter;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.index.TermVectorOffsetInfo;
 import org.apache.lucene.search.Similarity;

Modified: lucene/dev/branches/realtime_search/lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestEmptyIndex.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestEmptyIndex.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestEmptyIndex.java (original)
+++ lucene/dev/branches/realtime_search/lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestEmptyIndex.java Mon Jan  3 00:30:27 2011
@@ -18,8 +18,6 @@ package org.apache.lucene.store.instanti
 
 import java.io.IOException;
 import java.util.Arrays;
-import java.util.Random;
-
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.IndexWriter;

Modified: lucene/dev/branches/realtime_search/lucene/contrib/misc/src/test/org/apache/lucene/misc/TestHighFreqTerms.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/contrib/misc/src/test/org/apache/lucene/misc/TestHighFreqTerms.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/contrib/misc/src/test/org/apache/lucene/misc/TestHighFreqTerms.java (original)
+++ lucene/dev/branches/realtime_search/lucene/contrib/misc/src/test/org/apache/lucene/misc/TestHighFreqTerms.java Mon Jan  3 00:30:27 2011
@@ -17,8 +17,6 @@ package org.apache.lucene.misc;
  * limitations under the License.
  */
 
-import java.util.Random;
- 
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.IndexWriter;
 import org.apache.lucene.util.BytesRef;

Modified: lucene/dev/branches/realtime_search/lucene/contrib/queries/src/test/org/apache/lucene/search/TermsFilterTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/contrib/queries/src/test/org/apache/lucene/search/TermsFilterTest.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/contrib/queries/src/test/org/apache/lucene/search/TermsFilterTest.java (original)
+++ lucene/dev/branches/realtime_search/lucene/contrib/queries/src/test/org/apache/lucene/search/TermsFilterTest.java Mon Jan  3 00:30:27 2011
@@ -18,8 +18,6 @@ package org.apache.lucene.search;
  */
 
 import java.util.HashSet;
-import java.util.Random;
-
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
 import org.apache.lucene.index.IndexReader;

Modified: lucene/dev/branches/realtime_search/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/processors/LowercaseExpandedTermsQueryNodeProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/processors/LowercaseExpandedTermsQueryNodeProcessor.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/processors/LowercaseExpandedTermsQueryNodeProcessor.java (original)
+++ lucene/dev/branches/realtime_search/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/processors/LowercaseExpandedTermsQueryNodeProcessor.java Mon Jan  3 00:30:27 2011
@@ -21,7 +21,6 @@ import java.util.List;
 
 import org.apache.lucene.queryParser.core.QueryNodeException;
 import org.apache.lucene.queryParser.core.config.QueryConfigHandler;
-import org.apache.lucene.queryParser.core.nodes.FieldQueryNode;
 import org.apache.lucene.queryParser.core.nodes.FuzzyQueryNode;
 import org.apache.lucene.queryParser.core.nodes.ParametricQueryNode;
 import org.apache.lucene.queryParser.core.nodes.QueryNode;

Modified: lucene/dev/branches/realtime_search/lucene/contrib/remote/src/test/org/apache/lucene/search/TestRemoteCachingWrapperFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/contrib/remote/src/test/org/apache/lucene/search/TestRemoteCachingWrapperFilter.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/contrib/remote/src/test/org/apache/lucene/search/TestRemoteCachingWrapperFilter.java (original)
+++ lucene/dev/branches/realtime_search/lucene/contrib/remote/src/test/org/apache/lucene/search/TestRemoteCachingWrapperFilter.java Mon Jan  3 00:30:27 2011
@@ -31,8 +31,6 @@ import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-import static org.junit.Assert.*;
-
 /**
  * Tests that the index is cached on the searcher side of things.
  */

Modified: lucene/dev/branches/realtime_search/lucene/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSearchable.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSearchable.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSearchable.java (original)
+++ lucene/dev/branches/realtime_search/lucene/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSearchable.java Mon Jan  3 00:30:27 2011
@@ -26,8 +26,6 @@ import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-import static org.junit.Assert.*;
-
 import java.util.Collections;
 import java.util.Set;
 import java.util.HashSet;
@@ -124,8 +122,7 @@ public class TestRemoteSearchable extend
     Searchable[] searchables = { lookupRemote() };
     Searcher searcher = new MultiSearcher(searchables);
     ScoreDoc[] hits = searcher.search(
-          new ConstantScoreQuery(new QueryWrapperFilter(
-                                   new TermQuery(new Term("test", "test")))), null, 1000).scoreDocs;
+          new ConstantScoreQuery(new TermQuery(new Term("test", "test"))), null, 1000).scoreDocs;
     assertEquals(1, hits.length);
   }
 }

Modified: lucene/dev/branches/realtime_search/lucene/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSort.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSort.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSort.java (original)
+++ lucene/dev/branches/realtime_search/lucene/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSort.java Mon Jan  3 00:30:27 2011
@@ -17,8 +17,6 @@ package org.apache.lucene.search;
  * limitations under the License.
  */
 
-import static org.junit.Assert.assertEquals;
-
 import java.io.IOException;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -30,7 +28,6 @@ import org.apache.lucene.document.Docume
 import org.apache.lucene.document.Field;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.IndexWriter;
-import org.apache.lucene.index.LogMergePolicy;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.BytesRef;

Modified: lucene/dev/branches/realtime_search/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/geohash/TestGeoHashUtils.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/geohash/TestGeoHashUtils.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/geohash/TestGeoHashUtils.java (original)
+++ lucene/dev/branches/realtime_search/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/geohash/TestGeoHashUtils.java Mon Jan  3 00:30:27 2011
@@ -17,8 +17,6 @@
 
 package org.apache.lucene.spatial.geohash;
 
-import static junit.framework.Assert.*;
-
 import org.apache.lucene.util.LuceneTestCase;
 import org.junit.Test;
 

Modified: lucene/dev/branches/realtime_search/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/geometry/TestDistanceUnits.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/geometry/TestDistanceUnits.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/geometry/TestDistanceUnits.java (original)
+++ lucene/dev/branches/realtime_search/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/geometry/TestDistanceUnits.java Mon Jan  3 00:30:27 2011
@@ -1,7 +1,5 @@
 package org.apache.lucene.spatial.geometry;
 
-import static junit.framework.Assert.*;
-
 import org.apache.lucene.util.LuceneTestCase;
 import org.junit.Test;
 

Modified: lucene/dev/branches/realtime_search/lucene/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SuggestWord.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SuggestWord.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SuggestWord.java (original)
+++ lucene/dev/branches/realtime_search/lucene/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SuggestWord.java Mon Jan  3 00:30:27 2011
@@ -1,7 +1,5 @@
 package org.apache.lucene.search.spell;
 
-import java.util.Comparator;
-
 
 /**
  * Licensed to the Apache Software Foundation (ASF) under one or more

Modified: lucene/dev/branches/realtime_search/lucene/contrib/wordnet/src/test/org/apache/lucene/wordnet/TestSynonymTokenFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/contrib/wordnet/src/test/org/apache/lucene/wordnet/TestSynonymTokenFilter.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/contrib/wordnet/src/test/org/apache/lucene/wordnet/TestSynonymTokenFilter.java (original)
+++ lucene/dev/branches/realtime_search/lucene/contrib/wordnet/src/test/org/apache/lucene/wordnet/TestSynonymTokenFilter.java Mon Jan  3 00:30:27 2011
@@ -17,8 +17,6 @@ package org.apache.lucene.wordnet;
  * limitations under the License.
  */
 
-import java.io.File;
-import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.Reader;
 
@@ -27,8 +25,6 @@ import org.apache.lucene.analysis.MockTo
 import org.apache.lucene.analysis.TokenStream;
 import org.apache.lucene.analysis.Tokenizer;
 import org.apache.lucene.analysis.BaseTokenStreamTestCase;
-import org.apache.lucene.analysis.core.LowerCaseFilter;
-import org.apache.lucene.analysis.core.WhitespaceTokenizer;
 
 public class TestSynonymTokenFilter extends BaseTokenStreamTestCase {
   final String testFile = "testSynonyms.txt";

Modified: lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/analysis/NumericTokenStream.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/analysis/NumericTokenStream.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/analysis/NumericTokenStream.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/analysis/NumericTokenStream.java Mon Jan  3 00:30:27 2011
@@ -19,7 +19,6 @@ package org.apache.lucene.analysis;
 
 import org.apache.lucene.util.Attribute;
 import org.apache.lucene.util.AttributeImpl;
-import org.apache.lucene.util.AttributeSource;
 import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.NumericUtils;
 import org.apache.lucene.document.NumericField; // for javadocs

Modified: lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/index/DocInverterPerField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/index/DocInverterPerField.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/index/DocInverterPerField.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/index/DocInverterPerField.java Mon Jan  3 00:30:27 2011
@@ -127,8 +127,6 @@ final class DocInverterPerField extends 
 
           // reset the TokenStream to the first token
           stream.reset();
-
-          final int startLength = fieldState.length;
           
           try {
             boolean hasMoreTokens = stream.incrementToken();

Modified: lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/index/codecs/pulsing/PulsingPostingsWriterImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/index/codecs/pulsing/PulsingPostingsWriterImpl.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/index/codecs/pulsing/PulsingPostingsWriterImpl.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/index/codecs/pulsing/PulsingPostingsWriterImpl.java Mon Jan  3 00:30:27 2011
@@ -228,8 +228,11 @@ public final class PulsingPostingsWriter
   }
 
   @Override
-  public void finishDoc() {
+  public void finishDoc() throws IOException {
     assert omitTF || currentDoc.numPositions == currentDoc.termDocFreq;
+    if (pulsed) {
+      wrappedPostingsWriter.finishDoc();
+    }
   }
 
   boolean pendingIsIndexTerm;

Modified: lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/queryParser/QueryParser.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/queryParser/QueryParser.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/queryParser/QueryParser.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/queryParser/QueryParser.java Mon Jan  3 00:30:27 2011
@@ -1,41 +1,18 @@
 /* Generated By:JavaCC: Do not edit this line. QueryParser.java */
 package org.apache.lucene.queryParser;
 
-import java.io.IOException;
 import java.io.StringReader;
-import java.text.Collator;
-import java.text.DateFormat;
 import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Locale;
-import java.util.Map;
 
 import org.apache.lucene.analysis.Analyzer;
-import org.apache.lucene.analysis.CachingTokenFilter;
-import org.apache.lucene.analysis.TokenStream;
-import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute;
-import org.apache.lucene.analysis.tokenattributes.TermToBytesRefAttribute;
 import org.apache.lucene.document.DateTools;
-import org.apache.lucene.index.Term;
 import org.apache.lucene.search.BooleanClause;
-import org.apache.lucene.search.BooleanQuery;
-import org.apache.lucene.search.FuzzyQuery;
-import org.apache.lucene.search.MultiTermQuery;
-import org.apache.lucene.search.MatchAllDocsQuery;
-import org.apache.lucene.search.MultiPhraseQuery;
-import org.apache.lucene.search.PhraseQuery;
-import org.apache.lucene.search.PrefixQuery;
-import org.apache.lucene.search.RegexpQuery;
 import org.apache.lucene.search.Query;
 import org.apache.lucene.search.TermRangeQuery;
 import org.apache.lucene.search.TermQuery;
-import org.apache.lucene.search.WildcardQuery;
-import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.Version;
-import org.apache.lucene.util.VirtualMethod;
 
 /**
  * This class is generated by JavaCC.  The most important method is
@@ -500,12 +477,6 @@ public class QueryParser extends QueryPa
     finally { jj_save(0, xla); }
   }
 
-  private boolean jj_3R_3() {
-    if (jj_scan_token(STAR)) return true;
-    if (jj_scan_token(COLON)) return true;
-    return false;
-  }
-
   private boolean jj_3R_2() {
     if (jj_scan_token(TERM)) return true;
     if (jj_scan_token(COLON)) return true;
@@ -522,6 +493,12 @@ public class QueryParser extends QueryPa
     return false;
   }
 
+  private boolean jj_3R_3() {
+    if (jj_scan_token(STAR)) return true;
+    if (jj_scan_token(COLON)) return true;
+    return false;
+  }
+
   /** Generated Token Manager. */
   public QueryParserTokenManager token_source;
   /** Current token. */

Modified: lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/queryParser/QueryParser.jj
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/queryParser/QueryParser.jj?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/queryParser/QueryParser.jj (original)
+++ lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/queryParser/QueryParser.jj Mon Jan  3 00:30:27 2011
@@ -25,41 +25,18 @@ PARSER_BEGIN(QueryParser)
 
 package org.apache.lucene.queryParser;
 
-import java.io.IOException;
 import java.io.StringReader;
-import java.text.Collator;
-import java.text.DateFormat;
 import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Locale;
-import java.util.Map;
 
 import org.apache.lucene.analysis.Analyzer;
-import org.apache.lucene.analysis.CachingTokenFilter;
-import org.apache.lucene.analysis.TokenStream;
-import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute;
-import org.apache.lucene.analysis.tokenattributes.TermToBytesRefAttribute;
 import org.apache.lucene.document.DateTools;
-import org.apache.lucene.index.Term;
 import org.apache.lucene.search.BooleanClause;
-import org.apache.lucene.search.BooleanQuery;
-import org.apache.lucene.search.FuzzyQuery;
-import org.apache.lucene.search.MultiTermQuery;
-import org.apache.lucene.search.MatchAllDocsQuery;
-import org.apache.lucene.search.MultiPhraseQuery;
-import org.apache.lucene.search.PhraseQuery;
-import org.apache.lucene.search.PrefixQuery;
-import org.apache.lucene.search.RegexpQuery;
 import org.apache.lucene.search.Query;
 import org.apache.lucene.search.TermRangeQuery;
 import org.apache.lucene.search.TermQuery;
-import org.apache.lucene.search.WildcardQuery;
-import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.Version;
-import org.apache.lucene.util.VirtualMethod;
 
 /**
  * This class is generated by JavaCC.  The most important method is

Modified: lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/queryParser/QueryParserBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/queryParser/QueryParserBase.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/queryParser/QueryParserBase.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/queryParser/QueryParserBase.java Mon Jan  3 00:30:27 2011
@@ -36,7 +36,7 @@ import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.Version;
 
 /** This class is overridden by QueryParser in QueryParser.jj
- * and acts to eparate the majority of the Java code from the .jj grammar file. 
+ * and acts to separate the majority of the Java code from the .jj grammar file. 
  */
 public abstract class QueryParserBase {
 

Modified: lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/queryParser/QueryParserTokenManager.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/queryParser/QueryParserTokenManager.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/queryParser/QueryParserTokenManager.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/queryParser/QueryParserTokenManager.java Mon Jan  3 00:30:27 2011
@@ -1,39 +1,16 @@
 /* Generated By:JavaCC: Do not edit this line. QueryParserTokenManager.java */
 package org.apache.lucene.queryParser;
-import java.io.IOException;
 import java.io.StringReader;
-import java.text.Collator;
-import java.text.DateFormat;
 import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Locale;
-import java.util.Map;
 import org.apache.lucene.analysis.Analyzer;
-import org.apache.lucene.analysis.CachingTokenFilter;
-import org.apache.lucene.analysis.TokenStream;
-import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute;
-import org.apache.lucene.analysis.tokenattributes.TermToBytesRefAttribute;
 import org.apache.lucene.document.DateTools;
-import org.apache.lucene.index.Term;
 import org.apache.lucene.search.BooleanClause;
-import org.apache.lucene.search.BooleanQuery;
-import org.apache.lucene.search.FuzzyQuery;
-import org.apache.lucene.search.MultiTermQuery;
-import org.apache.lucene.search.MatchAllDocsQuery;
-import org.apache.lucene.search.MultiPhraseQuery;
-import org.apache.lucene.search.PhraseQuery;
-import org.apache.lucene.search.PrefixQuery;
-import org.apache.lucene.search.RegexpQuery;
 import org.apache.lucene.search.Query;
 import org.apache.lucene.search.TermRangeQuery;
 import org.apache.lucene.search.TermQuery;
-import org.apache.lucene.search.WildcardQuery;
-import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.Version;
-import org.apache.lucene.util.VirtualMethod;
 
 /** Token Manager. */
 public class QueryParserTokenManager implements QueryParserConstants

Modified: lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/BoostAttributeImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/BoostAttributeImpl.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/BoostAttributeImpl.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/BoostAttributeImpl.java Mon Jan  3 00:30:27 2011
@@ -17,7 +17,6 @@ package org.apache.lucene.search;
  * limitations under the License.
  */
 
-import org.apache.lucene.util.Attribute;
 import org.apache.lucene.util.AttributeImpl;
 
 /** Implementation class for {@link BoostAttribute}.

Modified: lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/ConstantScoreAutoRewrite.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/ConstantScoreAutoRewrite.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/ConstantScoreAutoRewrite.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/ConstantScoreAutoRewrite.java Mon Jan  3 00:30:27 2011
@@ -103,7 +103,7 @@ class ConstantScoreAutoRewrite extends T
         addClause(bq, placeholderTerm.createTerm(pendingTerms.get(sort[i], new BytesRef())), 1, 1.0f);
       }
       // Strip scores
-      final Query result = new ConstantScoreQuery(new QueryWrapperFilter(bq));
+      final Query result = new ConstantScoreQuery(bq);
       result.setBoost(query.getBoost());
       query.incTotalNumberOfTerms(size);
       return result;

Modified: lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/ConstantScoreQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/ConstantScoreQuery.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/ConstantScoreQuery.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/ConstantScoreQuery.java Mon Jan  3 00:30:27 2011
@@ -19,13 +19,15 @@ package org.apache.lucene.search;
 
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.Term;
+import org.apache.lucene.util.ToStringUtils;
 
 import java.io.IOException;
 import java.util.Set;
 
 /**
- * A query that wraps a filter and simply returns a constant score equal to the
- * query boost for every document in the filter.
+ * A query that wraps another query or a filter and simply returns a constant score equal to the
+ * query boost for every document that matches the filter or query.
+ * For queries it therefore simply strips of all scores and returns a constant one.
  *
  * <p><b>NOTE</b>: if the wrapped filter is an instance of
  * {@link CachingWrapperFilter}, you'll likely want to
@@ -35,34 +37,72 @@ import java.util.Set;
  */
 public class ConstantScoreQuery extends Query {
   protected final Filter filter;
+  protected final Query query;
 
+  /** Strips off scores from the passed in Query. The hits will get a constant score
+   * dependent on the boost factor of this query. */
+  public ConstantScoreQuery(Query query) {
+    if (query == null)
+      throw new NullPointerException("Query may not be null");
+    this.filter = null;
+    this.query = query;
+  }
+
+  /** Wraps a Filter as a Query. The hits will get a constant score
+   * dependent on the boost factor of this query.
+   * If you simply want to strip off scores from a Query, no longer use
+   * {@code new ConstantScoreQuery(new QueryWrapperFilter(query))}, instead
+   * use {@link #ConstantScoreQuery(Query)}!
+   */
   public ConstantScoreQuery(Filter filter) {
-    this.filter=filter;
+    if (filter == null)
+      throw new NullPointerException("Filter may not be null");
+    this.filter = filter;
+    this.query = null;
   }
 
-  /** Returns the encapsulated filter */
+  /** Returns the encapsulated filter, returns {@code null} if a query is wrapped. */
   public Filter getFilter() {
     return filter;
   }
 
+  /** Returns the encapsulated query, returns {@code null} if a filter is wrapped. */
+  public Query getQuery() {
+    return query;
+  }
+
   @Override
   public Query rewrite(IndexReader reader) throws IOException {
+    if (query != null) {
+      Query rewritten = query.rewrite(reader);
+      if (rewritten != query) {
+        rewritten = new ConstantScoreQuery(rewritten);
+        rewritten.setBoost(this.getBoost());
+        return rewritten;
+      }
+    }
     return this;
   }
 
   @Override
   public void extractTerms(Set<Term> terms) {
-    // OK to not add any terms when used for MultiSearcher,
-    // but may not be OK for highlighting
+    // TODO: OK to not add any terms when wrapped a filter
+    // and used with MultiSearcher, but may not be OK for
+    // highlighting.
+    // If a query was wrapped, we delegate to query.
+    if (query != null)
+      query.extractTerms(terms);
   }
 
   protected class ConstantWeight extends Weight {
-    private Similarity similarity;
+    private final Weight innerWeight;
+    private final Similarity similarity;
     private float queryNorm;
     private float queryWeight;
     
-    public ConstantWeight(Searcher searcher) {
+    public ConstantWeight(Searcher searcher) throws IOException {
       this.similarity = getSimilarity(searcher);
+      this.innerWeight = (query == null) ? null : query.createWeight(searcher);
     }
 
     @Override
@@ -77,6 +117,8 @@ public class ConstantScoreQuery extends 
 
     @Override
     public float sumOfSquaredWeights() throws IOException {
+      // we calculate sumOfSquaredWeights of the inner weight, but ignore it (just to initialize everything)
+      if (innerWeight != null) innerWeight.sumOfSquaredWeights();
       queryWeight = getBoost();
       return queryWeight * queryWeight;
     }
@@ -85,31 +127,48 @@ public class ConstantScoreQuery extends 
     public void normalize(float norm) {
       this.queryNorm = norm;
       queryWeight *= this.queryNorm;
+      // we normalize the inner weight, but ignore it (just to initialize everything)
+      if (innerWeight != null) innerWeight.normalize(norm);
     }
 
     @Override
     public Scorer scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer) throws IOException {
-      return new ConstantScorer(similarity, reader, this);
+      final DocIdSetIterator disi;
+      if (filter != null) {
+        assert query == null;
+        final DocIdSet dis = filter.getDocIdSet(reader);
+        if (dis == null)
+          return null;
+        disi = dis.iterator();
+      } else {
+        assert query != null && innerWeight != null;
+        disi =
+          innerWeight.scorer(reader, scoreDocsInOrder, topScorer);
+      }
+      if (disi == null)
+        return null;
+      return new ConstantScorer(similarity, disi, this);
+    }
+    
+    @Override
+    public boolean scoresDocsOutOfOrder() {
+      return (innerWeight != null) ? innerWeight.scoresDocsOutOfOrder() : false;
     }
 
     @Override
     public Explanation explain(IndexReader reader, int doc) throws IOException {
-      
-      ConstantScorer cs = new ConstantScorer(similarity, reader, this);
-      boolean exists = cs.docIdSetIterator.advance(doc) == doc;
-
-      ComplexExplanation result = new ComplexExplanation();
+      final Scorer cs = scorer(reader, true, false);
+      final boolean exists = (cs != null && cs.advance(doc) == doc);
 
+      final ComplexExplanation result = new ComplexExplanation();
       if (exists) {
-        result.setDescription("ConstantScoreQuery(" + filter
-        + "), product of:");
+        result.setDescription(ConstantScoreQuery.this.toString() + ", product of:");
         result.setValue(queryWeight);
         result.setMatch(Boolean.TRUE);
         result.addDetail(new Explanation(getBoost(), "boost"));
-        result.addDetail(new Explanation(queryNorm,"queryNorm"));
+        result.addDetail(new Explanation(queryNorm, "queryNorm"));
       } else {
-        result.setDescription("ConstantScoreQuery(" + filter
-        + ") doesn't match id " + doc);
+        result.setDescription(ConstantScoreQuery.this.toString() + " doesn't match id " + doc);
         result.setValue(0);
         result.setMatch(Boolean.FALSE);
       }
@@ -120,22 +179,11 @@ public class ConstantScoreQuery extends 
   protected class ConstantScorer extends Scorer {
     final DocIdSetIterator docIdSetIterator;
     final float theScore;
-    int doc = -1;
 
-    public ConstantScorer(Similarity similarity, IndexReader reader, Weight w) throws IOException {
+    public ConstantScorer(Similarity similarity, DocIdSetIterator docIdSetIterator, Weight w) throws IOException {
       super(similarity,w);
       theScore = w.getValue();
-      DocIdSet docIdSet = filter.getDocIdSet(reader);
-      if (docIdSet == null) {
-        docIdSetIterator = DocIdSet.EMPTY_DOCIDSET.iterator();
-      } else {
-        DocIdSetIterator iter = docIdSet.iterator();
-        if (iter == null) {
-          docIdSetIterator = DocIdSet.EMPTY_DOCIDSET.iterator();
-        } else {
-          docIdSetIterator = iter;
-        }
-      }
+      this.docIdSetIterator = docIdSetIterator;
     }
 
     @Override
@@ -157,34 +205,88 @@ public class ConstantScoreQuery extends 
     public int advance(int target) throws IOException {
       return docIdSetIterator.advance(target);
     }
+    
+    private Collector wrapCollector(final Collector collector) {
+      return new Collector() {
+        @Override
+        public void setScorer(Scorer scorer) throws IOException {
+          // we must wrap again here, but using the scorer passed in as parameter:
+          collector.setScorer(new ConstantScorer(ConstantScorer.this.getSimilarity(),
+            scorer, ConstantScorer.this.weight));
+        }
+        
+        @Override
+        public void collect(int doc) throws IOException {
+          collector.collect(doc);
+        }
+        
+        @Override
+        public void setNextReader(IndexReader reader, int docBase) throws IOException {
+          collector.setNextReader(reader, docBase);
+        }
+        
+        @Override
+        public boolean acceptsDocsOutOfOrder() {
+          return collector.acceptsDocsOutOfOrder();
+        }
+      };
+    }
+
+    // this optimization allows out of order scoring as top scorer!
+    @Override
+    public void score(Collector collector) throws IOException {
+      if (docIdSetIterator instanceof Scorer) {
+        ((Scorer) docIdSetIterator).score(wrapCollector(collector));
+      } else {
+        super.score(collector);
+      }
+    }
+
+    // this optimization allows out of order scoring as top scorer,
+    // TODO: theoretically this method should not be called because its protected and
+    // this class does not use it, it should be public in Scorer!
+    @Override
+    protected boolean score(Collector collector, int max, int firstDocID) throws IOException {
+      if (docIdSetIterator instanceof Scorer) {
+        return ((Scorer) docIdSetIterator).score(wrapCollector(collector), max, firstDocID);
+      } else {
+        return super.score(collector, max, firstDocID);
+      }
+    }
   }
 
   @Override
-  public Weight createWeight(Searcher searcher) {
+  public Weight createWeight(Searcher searcher) throws IOException {
     return new ConstantScoreQuery.ConstantWeight(searcher);
   }
 
-  /** Prints a user-readable version of this query. */
   @Override
   public String toString(String field) {
-    return "ConstantScore(" + filter.toString() + ")"
-      + (getBoost()==1.0 ? "" : "^" + getBoost());
+    return new StringBuilder("ConstantScore(")
+      .append((query == null) ? filter.toString() : query.toString(field))
+      .append(')')
+      .append(ToStringUtils.boost(getBoost()))
+      .toString();
   }
 
-  /** Returns true if <code>o</code> is equal to this. */
   @Override
   public boolean equals(Object o) {
     if (this == o) return true;
-    if (!(o instanceof ConstantScoreQuery)) return false;
-    ConstantScoreQuery other = (ConstantScoreQuery)o;
-    return this.getBoost()==other.getBoost() && filter.equals(other.filter);
+    if (!super.equals(o))
+      return false;
+    if (o instanceof ConstantScoreQuery) {
+      final ConstantScoreQuery other = (ConstantScoreQuery) o;
+      return 
+        ((this.filter == null) ? other.filter == null : this.filter.equals(other.filter)) &&
+        ((this.query == null) ? other.query == null : this.query.equals(other.query));
+    }
+    return false;
   }
 
-  /** Returns a hash code value for this object. */
   @Override
   public int hashCode() {
-    // Simple add is OK since no existing filter hashcode has a float component.
-    return filter.hashCode() + Float.floatToIntBits(getBoost());
+    return 31 * super.hashCode() +
+      ((query == null) ? filter : query).hashCode();
   }
 
 }

Modified: lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/ExactPhraseScorer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/ExactPhraseScorer.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/ExactPhraseScorer.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/ExactPhraseScorer.java Mon Jan  3 00:30:27 2011
@@ -21,7 +21,6 @@ import java.io.IOException;
 import java.util.Arrays;
 
 import org.apache.lucene.index.*;
-import org.apache.lucene.search.BooleanClause.Occur;
 
 final class ExactPhraseScorer extends Scorer {
   private final byte[] norms;

Modified: lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/FuzzyTermsEnum.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/FuzzyTermsEnum.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/FuzzyTermsEnum.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/FuzzyTermsEnum.java Mon Jan  3 00:30:27 2011
@@ -321,7 +321,7 @@ public final class FuzzyTermsEnum extend
       
       // TODO: benchmark doing this backwards
       for (int i = 1; i < matchers.length; i++)
-        if (matchers[i].run(term.bytes, 0, term.length)) {
+        if (matchers[i].run(term.bytes, term.offset, term.length)) {
           // this sucks, we convert just to score based on length.
           if (codePointCount == -1) {
             codePointCount = UnicodeUtil.codePointCount(term);

Modified: lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/MaxNonCompetitiveBoostAttributeImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/MaxNonCompetitiveBoostAttributeImpl.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/MaxNonCompetitiveBoostAttributeImpl.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/MaxNonCompetitiveBoostAttributeImpl.java Mon Jan  3 00:30:27 2011
@@ -17,7 +17,6 @@ package org.apache.lucene.search;
  * limitations under the License.
  */
 
-import org.apache.lucene.util.Attribute;
 import org.apache.lucene.util.AttributeImpl;
 import org.apache.lucene.util.BytesRef;
 

Modified: lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/MultiTermQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/MultiTermQuery.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/MultiTermQuery.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/MultiTermQuery.java Mon Jan  3 00:30:27 2011
@@ -201,7 +201,7 @@ public abstract class MultiTermQuery ext
     
     @Override
     protected void addClause(BooleanQuery topLevel, Term term, int docFreq, float boost) {
-      final Query q = new ConstantScoreQuery(new QueryWrapperFilter(new TermQuery(term, docFreq)));
+      final Query q = new ConstantScoreQuery(new TermQuery(term, docFreq));
       q.setBoost(boost);
       topLevel.add(q, BooleanClause.Occur.SHOULD);
     }

Modified: lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/PhraseScorer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/PhraseScorer.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/PhraseScorer.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/PhraseScorer.java Mon Jan  3 00:30:27 2011
@@ -19,8 +19,6 @@ package org.apache.lucene.search;
 
 import java.io.IOException;
 
-import org.apache.lucene.search.BooleanClause.Occur;
-
 /** Expert: Scoring functionality for phrase queries.
  * <br>A document is considered matching if it contains the phrase-query terms  
  * at "valid" positions. What "valid positions" are

Modified: lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/QueryTermVector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/QueryTermVector.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/QueryTermVector.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/QueryTermVector.java Mon Jan  3 00:30:27 2011
@@ -28,7 +28,6 @@ import java.util.Map;
 
 import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.analysis.TokenStream;
-import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
 import org.apache.lucene.analysis.tokenattributes.TermToBytesRefAttribute;
 import org.apache.lucene.index.TermFreqVector;
 import org.apache.lucene.util.ArrayUtil;

Modified: lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/ScoringRewrite.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/ScoringRewrite.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/ScoringRewrite.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/ScoringRewrite.java Mon Jan  3 00:30:27 2011
@@ -18,21 +18,12 @@ package org.apache.lucene.search;
  */
 
 import java.io.IOException;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.PriorityQueue;
-import java.util.Comparator;
-
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.index.TermsEnum;
 import org.apache.lucene.search.MultiTermQuery.RewriteMethod;
 
 import org.apache.lucene.util.ArrayUtil;
-import org.apache.lucene.util.AttributeSource;
 import org.apache.lucene.util.ByteBlockPool;
 import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.BytesRefHash;
@@ -98,7 +89,7 @@ public abstract class ScoringRewrite<Q e
       if (bq.clauses().isEmpty())
         return bq;
       // strip the scores off
-      final Query result = new ConstantScoreQuery(new QueryWrapperFilter(bq));
+      final Query result = new ConstantScoreQuery(bq);
       result.setBoost(query.getBoost());
       return result;
     }

Modified: lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/TermCollectingRewrite.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/TermCollectingRewrite.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/TermCollectingRewrite.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/TermCollectingRewrite.java Mon Jan  3 00:30:27 2011
@@ -18,7 +18,6 @@ package org.apache.lucene.search;
  */
 
 import java.io.IOException;
-import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Comparator;

Modified: lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/TermScorer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/TermScorer.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/TermScorer.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/TermScorer.java Mon Jan  3 00:30:27 2011
@@ -20,7 +20,6 @@ package org.apache.lucene.search;
 import java.io.IOException;
 
 import org.apache.lucene.index.DocsEnum;
-import org.apache.lucene.search.BooleanClause.Occur;
 
 /** Expert: A <code>Scorer</code> for documents matching a <code>Term</code>.
  */

Modified: lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/payloads/AveragePayloadFunction.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/payloads/AveragePayloadFunction.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/payloads/AveragePayloadFunction.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/payloads/AveragePayloadFunction.java Mon Jan  3 00:30:27 2011
@@ -1,6 +1,5 @@
 package org.apache.lucene.search.payloads;
 
-import java.io.IOException;
 import org.apache.lucene.search.Explanation;
 /**
  * Licensed to the Apache Software Foundation (ASF) under one or more

Modified: lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/spans/SpanNearPayloadCheckQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/spans/SpanNearPayloadCheckQuery.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/spans/SpanNearPayloadCheckQuery.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/search/spans/SpanNearPayloadCheckQuery.java Mon Jan  3 00:30:27 2011
@@ -21,7 +21,6 @@ import org.apache.lucene.util.ToStringUt
 import java.io.IOException;
 import java.util.Arrays;
 import java.util.Collection;
-import java.util.Iterator;
 
 
 /**

Modified: lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/store/DataInput.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/store/DataInput.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/store/DataInput.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/store/DataInput.java Mon Jan  3 00:30:27 2011
@@ -21,9 +21,6 @@ import java.io.IOException;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.lucene.util.ArrayUtil;
-import org.apache.lucene.util.RamUsageEstimator;
-
 /**
  * Abstract base class for performing read operations of Lucene's low-level
  * data types.

Modified: lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/store/FSDirectory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/store/FSDirectory.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/store/FSDirectory.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/store/FSDirectory.java Mon Jan  3 00:30:27 2011
@@ -26,7 +26,6 @@ import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
 
 import java.util.Collection;
-import java.util.Collections;
 import static java.util.Collections.synchronizedSet;
 import java.util.HashSet;
 import java.util.Set;
@@ -162,10 +161,10 @@ public abstract class FSDirectory extend
    *  best implementation given the current environment.
    *  The directory returned uses the {@link NativeFSLockFactory}.
    *
-   *  <p>Currently this returns {@link NIOFSDirectory}
-   *  on non-Windows JREs, {@link MMapDirectory} on 64-bit 
-   *  Sun Windows JREs, and {@link SimpleFSDirectory} for other
-   *  JRes on Windows. It is highly recommended that you consult the
+   *  <p>Currently this returns {@link MMapDirectory} for most Solaris
+   *  and Windows 64-bit JREs, {@link NIOFSDirectory} for other
+   *  non-Windows JREs, and {@link SimpleFSDirectory} for other
+   *  JREs on Windows. It is highly recommended that you consult the
    *  implementation's documentation for your platform before
    *  using this method.
    *
@@ -185,11 +184,11 @@ public abstract class FSDirectory extend
   /** Just like {@link #open(File)}, but allows you to
    *  also specify a custom {@link LockFactory}. */
   public static FSDirectory open(File path, LockFactory lockFactory) throws IOException {
-    if (Constants.WINDOWS) {
-      if (MMapDirectory.UNMAP_SUPPORTED && Constants.JRE_IS_64BIT)
-        return new MMapDirectory(path, lockFactory);
-      else
-        return new SimpleFSDirectory(path, lockFactory);
+    if ((Constants.WINDOWS || Constants.SUN_OS)
+          && Constants.JRE_IS_64BIT && MMapDirectory.UNMAP_SUPPORTED) {
+      return new MMapDirectory(path, lockFactory);
+    } else if (Constants.WINDOWS) {
+      return new SimpleFSDirectory(path, lockFactory);
     } else {
       return new NIOFSDirectory(path, lockFactory);
     }

Modified: lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/store/FileSwitchDirectory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/store/FileSwitchDirectory.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/store/FileSwitchDirectory.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/store/FileSwitchDirectory.java Mon Jan  3 00:30:27 2011
@@ -21,7 +21,6 @@ import java.io.IOException;
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.List;
 import java.util.Set;
 import java.util.HashSet;

Modified: lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/analysis/MockTokenizer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/analysis/MockTokenizer.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/analysis/MockTokenizer.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/analysis/MockTokenizer.java Mon Jan  3 00:30:27 2011
@@ -21,7 +21,6 @@ import java.io.IOException;
 import java.io.Reader;
 
 import org.apache.lucene.util.Version;
-import org.apache.lucene.util.AttributeSource.AttributeFactory;
 import org.apache.lucene.util.automaton.CharacterRunAutomaton;
 import org.apache.lucene.util.automaton.RegExp;
 

Modified: lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/analysis/tokenattributes/TestCharTermAttributeImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/analysis/tokenattributes/TestCharTermAttributeImpl.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/analysis/tokenattributes/TestCharTermAttributeImpl.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/analysis/tokenattributes/TestCharTermAttributeImpl.java Mon Jan  3 00:30:27 2011
@@ -23,7 +23,6 @@ import java.nio.CharBuffer;
 import java.util.Formatter;
 import java.util.Locale;
 import java.util.regex.Pattern;
-import java.util.Random;
 
 public class TestCharTermAttributeImpl extends LuceneTestCase {
 

Modified: lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestIndexCommit.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestIndexCommit.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestIndexCommit.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestIndexCommit.java Mon Jan  3 00:30:27 2011
@@ -17,8 +17,6 @@ package org.apache.lucene.index;
  * limitations under the License.
  */
 
-import static org.junit.Assert.*;
-
 import java.io.IOException;
 import java.util.Collection;
 import java.util.Map;

Modified: lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestIsCurrent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestIsCurrent.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestIsCurrent.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestIsCurrent.java Mon Jan  3 00:30:27 2011
@@ -18,13 +18,11 @@ package org.apache.lucene.index;
  */
 
 import org.apache.lucene.document.Document;
-import org.apache.lucene.document.Field;
 import org.apache.lucene.document.Field.Index;
 import org.apache.lucene.document.Field.Store;
 import org.apache.lucene.util.*;
 import org.apache.lucene.store.*;
 
-import static org.junit.Assert.*;
 import org.junit.Test;
 
 import java.io.IOException;

Modified: lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestNRTThreads.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestNRTThreads.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestNRTThreads.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestNRTThreads.java Mon Jan  3 00:30:27 2011
@@ -45,9 +45,6 @@ import org.apache.lucene.util.LuceneTest
 import org.apache.lucene.util._TestUtil;
 import org.junit.Test;
 
-import static org.junit.Assert.*;
-import static org.junit.Assume.*;
-
 // TODO
 //   - mix in optimize, addIndexes
 //   - randomoly mix in non-congruent docs

Modified: lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestNoDeletionPolicy.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestNoDeletionPolicy.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestNoDeletionPolicy.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestNoDeletionPolicy.java Mon Jan  3 00:30:27 2011
@@ -17,17 +17,12 @@ package org.apache.lucene.index;
  * limitations under the License.
  */
 
-import static org.junit.Assert.*;
-
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 import java.util.Arrays;
-import java.util.Random;
-
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.document.Document;
-import org.apache.lucene.document.Field;
 import org.apache.lucene.document.Field.Index;
 import org.apache.lucene.document.Field.Store;
 import org.apache.lucene.store.Directory;

Modified: lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestNoMergePolicy.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestNoMergePolicy.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestNoMergePolicy.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestNoMergePolicy.java Mon Jan  3 00:30:27 2011
@@ -17,8 +17,6 @@ package org.apache.lucene.index;
  * limitations under the License.
  */
 
-import static org.junit.Assert.*;
-
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;

Modified: lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestNoMergeScheduler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestNoMergeScheduler.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestNoMergeScheduler.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestNoMergeScheduler.java Mon Jan  3 00:30:27 2011
@@ -17,8 +17,6 @@ package org.apache.lucene.index;
  * limitations under the License.
  */
 
-import static org.junit.Assert.*;
-
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;

Modified: lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestParallelReaderEmptyIndex.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestParallelReaderEmptyIndex.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestParallelReaderEmptyIndex.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestParallelReaderEmptyIndex.java Mon Jan  3 00:30:27 2011
@@ -25,7 +25,6 @@ import org.apache.lucene.util._TestUtil;
 
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.document.Document;
-import org.apache.lucene.document.Field;
 import org.apache.lucene.document.Field.Index;
 import org.apache.lucene.document.Field.Store;
 import org.apache.lucene.document.Field.TermVector;

Modified: lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestParallelTermEnum.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestParallelTermEnum.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestParallelTermEnum.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestParallelTermEnum.java Mon Jan  3 00:30:27 2011
@@ -22,7 +22,6 @@ import java.io.IOException;
 import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.document.Document;
-import org.apache.lucene.document.Field;
 import org.apache.lucene.document.Field.Index;
 import org.apache.lucene.document.Field.Store;
 import org.apache.lucene.store.Directory;

Modified: lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestPersistentSnapshotDeletionPolicy.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestPersistentSnapshotDeletionPolicy.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestPersistentSnapshotDeletionPolicy.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestPersistentSnapshotDeletionPolicy.java Mon Jan  3 00:30:27 2011
@@ -17,8 +17,6 @@ package org.apache.lucene.index;
  * the License.
  */
 
-import static org.junit.Assert.*;
-
 import java.io.IOException;
 import java.util.Map;
 import java.util.Map.Entry;

Modified: lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestRollback.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestRollback.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestRollback.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestRollback.java Mon Jan  3 00:30:27 2011
@@ -19,7 +19,6 @@ package org.apache.lucene.index;
 
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.document.Document;
-import org.apache.lucene.document.Field;
 import org.apache.lucene.document.Field.Index;
 import org.apache.lucene.document.Field.Store;
 import org.apache.lucene.store.Directory;

Modified: lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestSnapshotDeletionPolicy.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestSnapshotDeletionPolicy.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestSnapshotDeletionPolicy.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestSnapshotDeletionPolicy.java Mon Jan  3 00:30:27 2011
@@ -1,17 +1,13 @@
 package org.apache.lucene.index;
 
-import static org.junit.Assert.*;
-
 import java.util.Collection;
 import java.util.Map;
 import java.util.Random;
-import java.io.File;
 import java.io.IOException;
 
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
 import org.apache.lucene.store.Directory;
-import org.apache.lucene.store.FSDirectory;
 import org.apache.lucene.store.IndexInput;
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.index.IndexCommit;
@@ -21,7 +17,6 @@ import org.apache.lucene.index.IndexWrit
 import org.apache.lucene.index.SnapshotDeletionPolicy;
 import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util.ThreadInterruptedException;
-import org.apache.lucene.util._TestUtil;
 import org.junit.Test;
 
 //

Modified: lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestStressIndexing.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestStressIndexing.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestStressIndexing.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/test/org/apache/lucene/index/TestStressIndexing.java Mon Jan  3 00:30:27 2011
@@ -23,8 +23,6 @@ import org.apache.lucene.document.*;
 import org.apache.lucene.index.IndexWriterConfig.OpenMode;
 import org.apache.lucene.search.*;
 
-import java.io.File;
-
 public class TestStressIndexing extends LuceneTestCase {
   private static abstract class TimedThread extends Thread {
     volatile boolean failed;