lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sim...@apache.org
Subject svn commit: r1063188 [1/3] - in /lucene/dev/branches/bulkpostings: ./ dev-tools/idea/.idea/ dev-tools/idea/solr/contrib/uima/ dev-tools/maven/ dev-tools/maven/solr/contrib/ dev-tools/maven/solr/contrib/uima/ lucene/ lucene/contrib/instantiated/src/java...
Date Tue, 25 Jan 2011 09:39:54 GMT
Author: simonw
Date: Tue Jan 25 09:39:51 2011
New Revision: 1063188

URL: http://svn.apache.org/viewvc?rev=1063188&view=rev
Log:
merged revision 1062810 to 1063095

Added:
    lucene/dev/branches/bulkpostings/dev-tools/idea/solr/contrib/uima/
      - copied from r1063169, lucene/dev/trunk/dev-tools/idea/solr/contrib/uima/
    lucene/dev/branches/bulkpostings/dev-tools/idea/solr/contrib/uima/uima.iml
      - copied unchanged from r1063169, lucene/dev/trunk/dev-tools/idea/solr/contrib/uima/uima.iml
    lucene/dev/branches/bulkpostings/dev-tools/maven/solr/contrib/uima/
      - copied from r1063169, lucene/dev/trunk/dev-tools/maven/solr/contrib/uima/
    lucene/dev/branches/bulkpostings/dev-tools/maven/solr/contrib/uima/pom.xml.template
      - copied unchanged from r1063169, lucene/dev/trunk/dev-tools/maven/solr/contrib/uima/pom.xml.template
    lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/util/StringUtils.java
      - copied unchanged from r1063169, lucene/dev/trunk/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/util/StringUtils.java
    lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/core/builders/
      - copied from r1063169, lucene/dev/trunk/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/core/builders/
    lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/core/builders/TestQueryTreeBuilder.java
      - copied unchanged from r1063169, lucene/dev/trunk/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/core/builders/TestQueryTreeBuilder.java
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/search/SimilarityProvider.java
      - copied unchanged from r1063169, lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/SimilarityProvider.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/search/TestSimilarityProvider.java
      - copied unchanged from r1063169, lucene/dev/trunk/lucene/src/test/org/apache/lucene/search/TestSimilarityProvider.java
    lucene/dev/branches/bulkpostings/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/WaitForMergesTask.java
      - copied unchanged from r1063169, lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/WaitForMergesTask.java
Removed:
    lucene/dev/branches/bulkpostings/solr/contrib/uima/solr-uima-pom.xml.template
Modified:
    lucene/dev/branches/bulkpostings/   (props changed)
    lucene/dev/branches/bulkpostings/build.xml
    lucene/dev/branches/bulkpostings/dev-tools/idea/.idea/ant.xml
    lucene/dev/branches/bulkpostings/dev-tools/idea/.idea/modules.xml
    lucene/dev/branches/bulkpostings/dev-tools/idea/.idea/workspace.xml
    lucene/dev/branches/bulkpostings/dev-tools/maven/pom.xml.template
    lucene/dev/branches/bulkpostings/dev-tools/maven/solr/contrib/pom.xml.template
    lucene/dev/branches/bulkpostings/lucene/   (props changed)
    lucene/dev/branches/bulkpostings/lucene/CHANGES.txt
    lucene/dev/branches/bulkpostings/lucene/MIGRATE.txt
    lucene/dev/branches/bulkpostings/lucene/build.xml
    lucene/dev/branches/bulkpostings/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndexWriter.java
    lucene/dev/branches/bulkpostings/lucene/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java
    lucene/dev/branches/bulkpostings/lucene/contrib/misc/src/java/org/apache/lucene/index/FieldNormModifier.java
    lucene/dev/branches/bulkpostings/lucene/contrib/misc/src/test/org/apache/lucene/index/TestFieldNormModifier.java
    lucene/dev/branches/bulkpostings/lucene/contrib/misc/src/test/org/apache/lucene/misc/TestLengthNormModifier.java
    lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/builders/QueryTreeBuilder.java
    lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/config/FieldConfig.java
    lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/config/QueryConfigHandler.java
    lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QueryNode.java
    lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QueryNodeImpl.java
    lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/StandardBooleanQueryNodeBuilder.java
    lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldBoostMapFCListener.java
    lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldDateResolutionFCListener.java
    lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiTermRewriteMethodAttribute.java
    lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/StandardBooleanQueryNode.java
    lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/processors/BoostQueryNodeProcessor.java
    lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/processors/ParametricRangeQueryNodeProcessor.java
    lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/spans/SpansQueryConfigHandler.java
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/CompoundFileWriter.java
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/DocumentsWriter.java
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/DocumentsWriterThreadState.java
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/IndexWriter.java
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/IndexWriterConfig.java
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/LogMergePolicy.java
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/MergePolicy.java
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/NormsWriterPerField.java
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/SegmentDeletes.java
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/SegmentMerger.java
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/codecs/BlockTermsReader.java
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/codecs/MergeState.java
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/codecs/MultiLevelSkipListReader.java
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/codecs/TermsConsumer.java
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/codecs/standard/StandardPostingsReader.java
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/search/BooleanQuery.java
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/search/DefaultSimilarity.java
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/search/IndexSearcher.java
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/search/MatchAllDocsQuery.java
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/search/MultiPhraseQuery.java
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/search/PhraseQuery.java
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/search/Query.java
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/search/Similarity.java
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/search/TermQuery.java
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/search/Weight.java
    lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/search/spans/SpanWeight.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/index/DocHelper.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/index/TestDeletionPolicy.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/index/TestIndexFileDeleter.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/index/TestIndexReader.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/index/TestIndexReaderClone.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/index/TestIndexReaderCloneNorms.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/index/TestIndexReaderReopen.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/index/TestIndexWriterConfig.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/index/TestMaxTermFrequency.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/index/TestNorms.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/index/TestOmitTf.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/index/TestParallelReader.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/search/JustCompileSearch.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/search/QueryUtils.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/search/TestBoolean2.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/search/TestComplexExplanations.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/search/TestConstantScoreQuery.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/search/TestDisjunctionMaxQuery.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/search/TestMatchAllDocsQuery.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/search/TestMultiPhraseQuery.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/search/TestSetNorm.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/search/TestSimilarity.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/search/payloads/PayloadHelper.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/search/payloads/TestPayloadNearQuery.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/search/payloads/TestPayloadTermQuery.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/search/spans/TestSpans.java
    lucene/dev/branches/bulkpostings/modules/benchmark/CHANGES.txt
    lucene/dev/branches/bulkpostings/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java
    lucene/dev/branches/bulkpostings/modules/build.xml
    lucene/dev/branches/bulkpostings/solr/   (props changed)
    lucene/dev/branches/bulkpostings/solr/CHANGES.txt   (props changed)
    lucene/dev/branches/bulkpostings/solr/KEYS   (props changed)
    lucene/dev/branches/bulkpostings/solr/LICENSE.txt   (props changed)
    lucene/dev/branches/bulkpostings/solr/NOTICE.txt   (props changed)
    lucene/dev/branches/bulkpostings/solr/README.txt   (props changed)
    lucene/dev/branches/bulkpostings/solr/build.xml   (contents, props changed)
    lucene/dev/branches/bulkpostings/solr/client/   (props changed)
    lucene/dev/branches/bulkpostings/solr/common-build.xml   (props changed)
    lucene/dev/branches/bulkpostings/solr/contrib/   (props changed)
    lucene/dev/branches/bulkpostings/solr/contrib/uima/   (props changed)
    lucene/dev/branches/bulkpostings/solr/example/   (props changed)
    lucene/dev/branches/bulkpostings/solr/lib/   (props changed)
    lucene/dev/branches/bulkpostings/solr/site/   (props changed)
    lucene/dev/branches/bulkpostings/solr/src/   (props changed)
    lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/request/SimpleFacets.java
    lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/schema/IndexSchema.java
    lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/schema/SimilarityFactory.java
    lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/search/SolrConstantScoreQuery.java
    lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/search/SolrIndexSearcher.java
    lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/search/function/IDFValueSource.java
    lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/search/function/NormValueSource.java
    lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/search/function/TFValueSource.java
    lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/update/SolrIndexConfig.java
    lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/schema/CustomSimilarityFactory.java
    lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/schema/IndexSchemaTest.java
    lucene/dev/branches/bulkpostings/solr/testlogging.properties   (props changed)

Modified: lucene/dev/branches/bulkpostings/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/build.xml?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/build.xml (original)
+++ lucene/dev/branches/bulkpostings/build.xml Tue Jan 25 09:39:51 2011
@@ -41,7 +41,7 @@
   <property name="version" value="4.0-SNAPSHOT"/>
   <target name="get-maven-poms" 
           description="Copy Maven POMs from dev-tools/maven/ to their target locations">
-    <copy todir=".">
+    <copy todir="." overwrite="true">
       <fileset dir="${basedir}/dev-tools/maven"/>
       <filterset begintoken="@" endtoken="@">
         <filter token="version" value="${version}"/>

Modified: lucene/dev/branches/bulkpostings/dev-tools/idea/.idea/ant.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/dev-tools/idea/.idea/ant.xml?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/dev-tools/idea/.idea/ant.xml (original)
+++ lucene/dev/branches/bulkpostings/dev-tools/idea/.idea/ant.xml Tue Jan 25 09:39:51 2011
@@ -31,5 +31,6 @@
     <buildFile url="file://$PROJECT_DIR$/solr/contrib/clustering/build.xml" />
     <buildFile url="file://$PROJECT_DIR$/solr/contrib/dataimporthandler/build.xml" />
     <buildFile url="file://$PROJECT_DIR$/solr/contrib/extraction/build.xml" />
+    <buildFile url="file://$PROJECT_DIR$/solr/contrib/uima/build.xml" />
   </component>
 </project>

Modified: lucene/dev/branches/bulkpostings/dev-tools/idea/.idea/modules.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/dev-tools/idea/.idea/modules.xml?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/dev-tools/idea/.idea/modules.xml (original)
+++ lucene/dev/branches/bulkpostings/dev-tools/idea/.idea/modules.xml Tue Jan 25 09:39:51 2011
@@ -32,6 +32,7 @@
       <module filepath="$PROJECT_DIR$/solr/contrib/dataimporthandler/dataimporthandler.iml" />
       <module filepath="$PROJECT_DIR$/solr/contrib/dataimporthandler/src/extras/extras.iml" />
       <module filepath="$PROJECT_DIR$/solr/contrib/extraction/extraction.iml" />
+      <module filepath="$PROJECT_DIR$/solr/contrib/uima/uima.iml" />
     </modules>
   </component>
 </project>

Modified: lucene/dev/branches/bulkpostings/dev-tools/idea/.idea/workspace.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/dev-tools/idea/.idea/workspace.xml?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/dev-tools/idea/.idea/workspace.xml (original)
+++ lucene/dev/branches/bulkpostings/dev-tools/idea/.idea/workspace.xml Tue Jan 25 09:39:51 2011
@@ -92,7 +92,7 @@
       <option name="VM_PARAMETERS" value="-ea -DtempDir=temp" />
       <option name="TEST_SEARCH_SCOPE"><value defaultName="singleModule" /></option>
     </configuration>
-    <configuration default="false" name="lucene" type="JUnit" factoryName="JUnit">
+    <configuration default="true" name="lucene" type="JUnit" factoryName="JUnit">
       <module name="lucene" />
       <option name="TEST_OBJECT" value="package" />
       <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/lucene/build" />
@@ -183,6 +183,13 @@
       <option name="VM_PARAMETERS" value="-ea -DtempDir=temp" />
       <option name="TEST_SEARCH_SCOPE"><value defaultName="singleModule" /></option>
     </configuration>
+    <configuration default="false" name="uima contrib" type="JUnit" factoryName="JUnit">
+      <module name="uima" />
+      <option name="TEST_OBJECT" value="package" />
+      <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/solr/contrib/uima/build" />
+      <option name="VM_PARAMETERS" value="-ea -Dtests.luceneMatchVersion=4.0 -DtempDir=temp" />
+      <option name="TEST_SEARCH_SCOPE"><value defaultName="singleModule" /></option>
+    </configuration>
     <configuration default="false" name="wordnet contrib" type="JUnit" factoryName="JUnit">
       <module name="wordnet" />
       <option name="TEST_OBJECT" value="package" />
@@ -224,8 +231,9 @@
       <item index="23" class="java.lang.String" itemvalue="JUnit.spellchecker contrib" />
       <item index="24" class="java.lang.String" itemvalue="JUnit.stempel analysis module" />
       <item index="25" class="java.lang.String" itemvalue="JUnit.swing contrib" />
-      <item index="26" class="java.lang.String" itemvalue="JUnit.wordnet contrib" />
-      <item index="27" class="java.lang.String" itemvalue="JUnit.xml-query-parser contrib" />
+      <item index="26" class="java.lang.String" itemvalue="JUnit.uima contrib" />
+      <item index="27" class="java.lang.String" itemvalue="JUnit.wordnet contrib" />
+      <item index="28" class="java.lang.String" itemvalue="JUnit.xml-query-parser contrib" />
     </list>
   </component>
 </project>

Modified: lucene/dev/branches/bulkpostings/dev-tools/maven/pom.xml.template
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/dev-tools/maven/pom.xml.template?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/dev-tools/maven/pom.xml.template (original)
+++ lucene/dev/branches/bulkpostings/dev-tools/maven/pom.xml.template Tue Jan 25 09:39:51 2011
@@ -41,6 +41,10 @@
     <base.specification.version>4.0.0</base.specification.version>
     <maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss</maven.build.timestamp.format>
     <java.compat.version>1.5</java.compat.version>
+    <jetty.version>6.1.26</jetty.version>
+    <slf4j.version>1.5.5</slf4j.version>
+    <tika.version>0.8</tika.version>
+    <uima.version>${project.version}</uima.version>
   </properties>
   <issueManagement>
     <system>JIRA</system>
@@ -246,12 +250,37 @@
       <dependency>
         <groupId>org.apache.tika</groupId>
         <artifactId>tika-core</artifactId>
-        <version>0.8</version>
+        <version>${tika.version}</version>
       </dependency>
       <dependency>
         <groupId>org.apache.tika</groupId>
         <artifactId>tika-parsers</artifactId>
-        <version>0.8</version>
+        <version>${tika.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.solr</groupId>
+        <artifactId>uima-alchemy-annotator</artifactId>
+        <version>${uima.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.solr</groupId>
+        <artifactId>uima-OpenCalaisAnnotator</artifactId>
+        <version>${uima.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.solr</groupId>
+        <artifactId>uima-Tagger</artifactId>
+        <version>${uima.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.solr</groupId>
+        <artifactId>uima-WhitespaceTokenizer</artifactId>
+        <version>${uima.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.solr</groupId>
+        <artifactId>uima-uimaj-core</artifactId>
+        <version>${uima.version}</version>
       </dependency>
       <dependency>
         <groupId>org.apache.velocity</groupId>
@@ -286,12 +315,12 @@
       <dependency>
         <groupId>org.mortbay.jetty</groupId>
         <artifactId>jetty</artifactId>
-        <version>6.1.26</version>
+        <version>${jetty.version}</version>
       </dependency>
       <dependency>
         <groupId>org.mortbay.jetty</groupId>
         <artifactId>jetty-util</artifactId>
-        <version>6.1.26</version>
+        <version>${jetty.version}</version>
       </dependency>
       <dependency>
         <groupId>org.mortbay.jetty</groupId>
@@ -301,7 +330,7 @@
       <dependency>
         <groupId>org.mortbay.jetty</groupId>
         <artifactId>jsp-2.1-jetty</artifactId>
-        <version>6.1.26</version>
+        <version>${jetty.version}</version>
       </dependency>
       <dependency>
         <groupId>org.mortbay.jetty</groupId>
@@ -311,24 +340,29 @@
       <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>jcl-over-slf4j</artifactId>
-        <version>1.5.5</version>
+        <version>${slf4j.version}</version>
       </dependency>
       <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>log4j-over-slf4j</artifactId>
-        <version>1.5.5</version>
+        <version>${slf4j.version}</version>
       </dependency>
       <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-api</artifactId>
-        <version>1.5.5</version>
+        <version>${slf4j.version}</version>
       </dependency> 
       <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-jdk14</artifactId>
-        <version>1.5.5</version>
+        <version>${slf4j.version}</version>
       </dependency> 
       <dependency>
+        <groupId>org.slf4j</groupId>
+        <artifactId>slf4j-simple</artifactId>
+        <version>${slf4j.version}</version>
+      </dependency>
+      <dependency>
         <groupId>xerces</groupId>
         <artifactId>xercesImpl</artifactId>
         <version>2.10.0</version>
@@ -480,7 +514,7 @@
         <plugin>
           <groupId>org.mortbay.jetty</groupId>
           <artifactId>maven-jetty-plugin</artifactId>
-          <version>6.1.26</version>
+          <version>${jetty.version}</version>
         </plugin>
         <plugin>
           <groupId>org.codehaus.gmaven</groupId>
@@ -681,6 +715,76 @@
                   <file>solr/lib/apache-solr-noggit-r944541.jar</file>
                 </configuration>  
               </execution>
+              <execution>
+                <id>install-solr-uima-alchemy-annotator</id>
+                <phase>install</phase>
+                <goals>
+                  <goal>install-file</goal>
+                </goals>
+                <configuration>
+                  <groupId>org.apache.solr</groupId>
+                  <artifactId>uima-alchemy-annotator</artifactId>
+                  <version>${uima.version}</version>
+                  <packaging>jar</packaging>
+                  <file>solr/contrib/uima/lib/uima-an-alchemy.jar</file>
+                </configuration>  
+              </execution>
+              <execution>
+                <id>install-solr-uima-OpenCalaisAnnotator</id>
+                <phase>install</phase>
+                <goals>
+                  <goal>install-file</goal>
+                </goals>
+                <configuration>
+                  <groupId>org.apache.solr</groupId>
+                  <artifactId>uima-OpenCalaisAnnotator</artifactId>
+                  <version>${uima.version}</version>
+                  <packaging>jar</packaging>
+                  <file>solr/contrib/uima/lib/uima-an-calais.jar</file>
+                </configuration>  
+              </execution>
+              <execution>
+                <id>install-solr-uima-Tagger</id>
+                <phase>install</phase>
+                <goals>
+                  <goal>install-file</goal>
+                </goals>
+                <configuration>
+                  <groupId>org.apache.solr</groupId>
+                  <artifactId>uima-Tagger</artifactId>
+                  <version>${uima.version}</version>
+                  <packaging>jar</packaging>
+                  <file>solr/contrib/uima/lib/uima-an-tagger.jar</file>
+                </configuration>  
+              </execution>
+              <execution>
+                <id>install-solr-uima-WhitespaceTokenizer</id>
+                <phase>install</phase>
+                <goals>
+                  <goal>install-file</goal>
+                </goals>
+                <configuration>
+                  <groupId>org.apache.solr</groupId>
+                  <artifactId>uima-WhitespaceTokenizer</artifactId>
+                  <version>${uima.version}</version>
+                  <packaging>jar</packaging>
+                  <file>solr/contrib/uima/lib/uima-an-wst.jar</file>
+                </configuration>  
+              </execution>
+              <execution>
+                <id>install-solr-uima-uimaj-core</id>
+                <phase>install</phase>
+                <goals>
+                  <goal>install-file</goal>
+                </goals>
+                <configuration>
+                  <groupId>org.apache.solr</groupId>
+                  <artifactId>uima-uimaj-core</artifactId>
+                  <version>${uima.version}</version>
+                  <packaging>jar</packaging>
+                  <file>solr/contrib/uima/lib/uima-core.jar</file>
+                </configuration>  
+              </execution>
             </executions>
           </plugin>
         </plugins>

Modified: lucene/dev/branches/bulkpostings/dev-tools/maven/solr/contrib/pom.xml.template
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/dev-tools/maven/solr/contrib/pom.xml.template?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/dev-tools/maven/solr/contrib/pom.xml.template (original)
+++ lucene/dev/branches/bulkpostings/dev-tools/maven/solr/contrib/pom.xml.template Tue Jan 25 09:39:51 2011
@@ -35,6 +35,7 @@
     <module>clustering</module>
     <module>dataimporthandler</module>
     <module>extraction</module>
+    <module>uima</module>
   </modules>
   <build>
     <directory>../build/solr-contrib-aggregator</directory>

Modified: lucene/dev/branches/bulkpostings/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/CHANGES.txt?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/CHANGES.txt (original)
+++ lucene/dev/branches/bulkpostings/lucene/CHANGES.txt Tue Jan 25 09:39:51 2011
@@ -131,6 +131,9 @@ Changes in backwards compatibility polic
 * LUCENE-2882: Cut over SpanQuery#getSpans to AtomicReaderContext to enforce
   per segment semantics on SpanQuery & Spans. (Simon Willnauer)
 
+* LUCENE-2236: Similarity can now be configured on a per-field basis. See the
+  migration notes in MIGRATE.txt for more details.  (Robert Muir, Doron Cohen)
+
 Changes in Runtime Behavior
 
 * LUCENE-2846: omitNorms now behaves like omitTermFrequencyAndPositions, if you
@@ -689,6 +692,9 @@ Bug fixes
   internally, it now calls Similarity.idfExplain(Collection, IndexSearcher).
   (Robert Muir)
 
+* LUCENE-2693: RAM used by IndexWriter was slightly incorrectly computed. 
+  (Jason Rutherglen via Shai Erera)
+
 New features
 
 * LUCENE-2128: Parallelized fetching document frequencies during weight

Modified: lucene/dev/branches/bulkpostings/lucene/MIGRATE.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/MIGRATE.txt?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/MIGRATE.txt (original)
+++ lucene/dev/branches/bulkpostings/lucene/MIGRATE.txt Tue Jan 25 09:39:51 2011
@@ -331,3 +331,9 @@ LUCENE-1458, LUCENE-2111: Flexible Index
   toString() is no longer implemented by AttributeImpl, so if you have overridden
   toString(), port your customization over to reflectWith(). reflectAsString() would
   then return what toString() did before.
+
+* LUCENE-2236: DefaultSimilarity can no longer be set statically (and dangerously) for the entire JVM.
+  Instead, IndexWriterConfig and IndexSearcher now take a SimilarityProvider.
+  Similarity can now be configured on a per-field basis.
+  Similarity retains only the field-specific relevance methods such as tf() and idf().
+  Methods that apply to the entire query such as coord() and queryNorm() exist in SimilarityProvider.

Modified: lucene/dev/branches/bulkpostings/lucene/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/build.xml?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/build.xml (original)
+++ lucene/dev/branches/bulkpostings/lucene/build.xml Tue Jan 25 09:39:51 2011
@@ -391,7 +391,7 @@
 
   <target name="generate-maven-artifacts" depends="maven.ant.tasks-check, package, jar-src, javadocs">
     <sequential>
-	  <ant target="get-maven-poms" inheritAll="false" dir=".."/>
+	  <ant target="get-maven-poms" dir=".."/>
  
       <m2-deploy pom.xml="../pom.xml"/> <!-- Lucene/Solr grandparent POM -->
       <m2-deploy pom.xml="pom.xml"/>    <!-- Lucene parent POM -->

Modified: lucene/dev/branches/bulkpostings/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndexWriter.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndexWriter.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndexWriter.java Tue Jan 25 09:39:51 2011
@@ -42,7 +42,8 @@ import org.apache.lucene.index.FieldInve
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.index.TermVectorOffsetInfo;
-import org.apache.lucene.search.Similarity;
+import org.apache.lucene.search.IndexSearcher;
+import org.apache.lucene.search.SimilarityProvider;
 import org.apache.lucene.util.StringHelper;
 import org.apache.lucene.util.ArrayUtil;
 import org.apache.lucene.util.CollectionUtil;
@@ -67,7 +68,7 @@ public class InstantiatedIndexWriter imp
   private final InstantiatedIndex index;
   private final Analyzer analyzer;
 
-  private Similarity similarity = Similarity.getDefault(); // how to normalize;
+  private SimilarityProvider similarityProvider = IndexSearcher.getDefaultSimilarityProvider(); // how to normalize;
 
   private transient Set<String> fieldNameBuffer;
   /**
@@ -236,11 +237,12 @@ public class InstantiatedIndexWriter imp
         termsInDocument += eFieldTermDocInfoFactoriesByTermText.getValue().size();
 
         if (eFieldTermDocInfoFactoriesByTermText.getKey().indexed && !eFieldTermDocInfoFactoriesByTermText.getKey().omitNorms) {
+          final String fieldName = eFieldTermDocInfoFactoriesByTermText.getKey().fieldName;
           final FieldInvertState invertState = new FieldInvertState();
           invertState.setBoost(eFieldTermDocInfoFactoriesByTermText.getKey().boost * document.getDocument().getBoost());
           invertState.setLength(eFieldTermDocInfoFactoriesByTermText.getKey().fieldLength);
-          final float norm = similarity.computeNorm(eFieldTermDocInfoFactoriesByTermText.getKey().fieldName, invertState);
-          normsByFieldNameAndDocumentNumber.get(eFieldTermDocInfoFactoriesByTermText.getKey().fieldName)[document.getDocumentNumber()] = similarity.encodeNormValue(norm);
+          final float norm = similarityProvider.get(fieldName).computeNorm(fieldName, invertState);
+          normsByFieldNameAndDocumentNumber.get(fieldName)[document.getDocumentNumber()] = similarityProvider.get(fieldName).encodeNormValue(norm);
         } else {
           System.currentTimeMillis();
         }
@@ -659,12 +661,12 @@ public class InstantiatedIndexWriter imp
     addDocument(doc, analyzer);
   }
 
-  public Similarity getSimilarity() {
-    return similarity;
+  public SimilarityProvider getSimilarityProvider() {
+    return similarityProvider;
   }
 
-  public void setSimilarity(Similarity similarity) {
-    this.similarity = similarity;
+  public void setSimilarityProvider(SimilarityProvider similarityProvider) {
+    this.similarityProvider = similarityProvider;
   }
 
   public Analyzer getAnalyzer() {

Modified: lucene/dev/branches/bulkpostings/lucene/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java Tue Jan 25 09:39:51 2011
@@ -58,6 +58,7 @@ import org.apache.lucene.search.IndexSea
 import org.apache.lucene.search.Query;
 import org.apache.lucene.search.Scorer;
 import org.apache.lucene.search.Similarity;
+import org.apache.lucene.search.SimilarityProvider;
 import org.apache.lucene.store.RAMDirectory; // for javadocs
 import org.apache.lucene.util.ArrayUtil;
 import org.apache.lucene.util.BytesRef;
@@ -1353,9 +1354,9 @@ public class MemoryIndex implements Seri
       };
     }
 
-    private Similarity getSimilarity() {
-      if (searcher != null) return searcher.getSimilarity();
-      return Similarity.getDefault();
+    private SimilarityProvider getSimilarityProvider() {
+      if (searcher != null) return searcher.getSimilarityProvider();
+      return IndexSearcher.getDefaultSimilarityProvider();
     }
     
     private void setSearcher(IndexSearcher searcher) {
@@ -1365,20 +1366,21 @@ public class MemoryIndex implements Seri
     /** performance hack: cache norms to avoid repeated expensive calculations */
     private byte[] cachedNorms;
     private String cachedFieldName;
-    private Similarity cachedSimilarity;
+    private SimilarityProvider cachedSimilarity;
     
     @Override
     public byte[] norms(String fieldName) {
       byte[] norms = cachedNorms;
-      Similarity sim = getSimilarity();
+      SimilarityProvider sim = getSimilarityProvider();
       if (fieldName != cachedFieldName || sim != cachedSimilarity) { // not cached?
         Info info = getInfo(fieldName);
+        Similarity fieldSim = sim.get(fieldName);
         int numTokens = info != null ? info.numTokens : 0;
         int numOverlapTokens = info != null ? info.numOverlapTokens : 0;
         float boost = info != null ? info.getBoost() : 1.0f; 
         FieldInvertState invertState = new FieldInvertState(0, numTokens, numOverlapTokens, 0, boost);
-        float n = sim.computeNorm(fieldName, invertState);
-        byte norm = sim.encodeNormValue(n);
+        float n = fieldSim.computeNorm(fieldName, invertState);
+        byte norm = fieldSim.encodeNormValue(n);
         norms = new byte[] {norm};
         
         // cache it for future reuse

Modified: lucene/dev/branches/bulkpostings/lucene/contrib/misc/src/java/org/apache/lucene/index/FieldNormModifier.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/contrib/misc/src/java/org/apache/lucene/index/FieldNormModifier.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/contrib/misc/src/java/org/apache/lucene/index/FieldNormModifier.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/contrib/misc/src/java/org/apache/lucene/index/FieldNormModifier.java Tue Jan 25 09:39:51 2011
@@ -24,6 +24,7 @@ import java.util.ArrayList;
 
 import org.apache.lucene.search.DefaultSimilarity;
 import org.apache.lucene.search.Similarity;
+import org.apache.lucene.search.SimilarityProvider;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.FSDirectory;
 import org.apache.lucene.util.StringHelper;
@@ -57,13 +58,13 @@ public class FieldNormModifier {
       System.exit(1);
     }
 
-    Similarity s = null;
+    SimilarityProvider s = null;
 
     if (args[1].equals("-d"))
       args[1] = DefaultSimilarity.class.getName();
 
     try {
-      s = Class.forName(args[1]).asSubclass(Similarity.class).newInstance();
+      s = Class.forName(args[1]).asSubclass(SimilarityProvider.class).newInstance();
     } catch (Exception e) {
       System.err.println("Couldn't instantiate similarity with empty constructor: " + args[1]);
       e.printStackTrace(System.err);
@@ -84,7 +85,7 @@ public class FieldNormModifier {
   
   
   private Directory dir;
-  private Similarity sim;
+  private SimilarityProvider sim;
   
   /**
    * Constructor for code that wishes to use this class programmatically
@@ -93,7 +94,7 @@ public class FieldNormModifier {
    * @param d the Directory to modify
    * @param s the Similarity to use (can be null)
    */
-  public FieldNormModifier(Directory d, Similarity s) {
+  public FieldNormModifier(Directory d, SimilarityProvider s) {
     dir = d;
     sim = s;
   }
@@ -111,7 +112,7 @@ public class FieldNormModifier {
    */
   public void reSetNorms(String field) throws IOException {
     String fieldName = StringHelper.intern(field);
-    
+    Similarity fieldSim = sim.get(field); 
     IndexReader reader = null;
     try {
       reader = IndexReader.open(dir, false);
@@ -148,7 +149,7 @@ public class FieldNormModifier {
         for (int d = 0; d < termCounts.length; d++) {
           if (delDocs == null || !delDocs.get(d)) {
             invertState.setLength(termCounts[d]);
-            subReader.setNorm(d, fieldName, sim.encodeNormValue(sim.computeNorm(fieldName, invertState)));
+            subReader.setNorm(d, fieldName, fieldSim.encodeNormValue(fieldSim.computeNorm(fieldName, invertState)));
           }
         }
       }

Modified: lucene/dev/branches/bulkpostings/lucene/contrib/misc/src/test/org/apache/lucene/index/TestFieldNormModifier.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/contrib/misc/src/test/org/apache/lucene/index/TestFieldNormModifier.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/contrib/misc/src/test/org/apache/lucene/index/TestFieldNormModifier.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/contrib/misc/src/test/org/apache/lucene/index/TestFieldNormModifier.java Tue Jan 25 09:39:51 2011
@@ -28,7 +28,7 @@ import org.apache.lucene.search.Collecto
 import org.apache.lucene.search.DefaultSimilarity;
 import org.apache.lucene.search.IndexSearcher;
 import org.apache.lucene.search.Scorer;
-import org.apache.lucene.search.Similarity;
+import org.apache.lucene.search.SimilarityProvider;
 import org.apache.lucene.search.TermQuery;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.LuceneTestCase;
@@ -42,7 +42,7 @@ public class TestFieldNormModifier exten
   public Directory store;
   
   /** inverts the normal notion of lengthNorm */
-  public static Similarity s = new DefaultSimilarity() {
+  public static SimilarityProvider s = new DefaultSimilarity() {
     @Override
     public float computeNorm(String fieldName, FieldInvertState state) {
       return state.getBoost() * (discountOverlaps ? state.getLength() - state.getNumOverlap() : state.getLength());

Modified: lucene/dev/branches/bulkpostings/lucene/contrib/misc/src/test/org/apache/lucene/misc/TestLengthNormModifier.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/contrib/misc/src/test/org/apache/lucene/misc/TestLengthNormModifier.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/contrib/misc/src/test/org/apache/lucene/misc/TestLengthNormModifier.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/contrib/misc/src/test/org/apache/lucene/misc/TestLengthNormModifier.java Tue Jan 25 09:39:51 2011
@@ -33,7 +33,7 @@ import org.apache.lucene.search.Collecto
 import org.apache.lucene.search.DefaultSimilarity;
 import org.apache.lucene.search.IndexSearcher;
 import org.apache.lucene.search.Scorer;
-import org.apache.lucene.search.Similarity;
+import org.apache.lucene.search.SimilarityProvider;
 import org.apache.lucene.search.TermQuery;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.LuceneTestCase;
@@ -47,7 +47,7 @@ public class TestLengthNormModifier exte
     public Directory store;
 
     /** inverts the normal notion of lengthNorm */
-    public static Similarity s = new DefaultSimilarity() {
+    public static SimilarityProvider s = new DefaultSimilarity() {
         @Override
         public float computeNorm(String fieldName, FieldInvertState state) {
           return state.getBoost() * (discountOverlaps ? state.getLength() - state.getNumOverlap() : state.getLength());
@@ -163,7 +163,7 @@ public class TestLengthNormModifier exte
 	}
 
 	// override the norms to be inverted
-	Similarity s = new DefaultSimilarity() {
+	SimilarityProvider s = new DefaultSimilarity() {
             @Override
             public float computeNorm(String fieldName, FieldInvertState state) {
               return state.getBoost() * (discountOverlaps ? state.getLength() - state.getNumOverlap() : state.getLength());

Modified: lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/builders/QueryTreeBuilder.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/builders/QueryTreeBuilder.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/builders/QueryTreeBuilder.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/builders/QueryTreeBuilder.java Tue Jan 25 09:39:51 2011
@@ -61,7 +61,7 @@ public class QueryTreeBuilder implements
 
   private HashMap<Class<? extends QueryNode>, QueryBuilder> queryNodeBuilders;
 
-  private HashMap<CharSequence, QueryBuilder> fieldNameBuilders;
+  private HashMap<String, QueryBuilder> fieldNameBuilders;
 
   /**
    * {@link QueryTreeBuilder} constructor.
@@ -73,28 +73,25 @@ public class QueryTreeBuilder implements
   /**
    * Associates a field name with a builder.
    * 
-   * @param fieldName
-   *          the field name
-   * @param builder
-   *          the builder to be associated
+   * @param fieldName the field name
+   * @param builder the builder to be associated
    */
   public void setBuilder(CharSequence fieldName, QueryBuilder builder) {
 
     if (this.fieldNameBuilders == null) {
-      this.fieldNameBuilders = new HashMap<CharSequence, QueryBuilder>();
+      this.fieldNameBuilders = new HashMap<String, QueryBuilder>();
     }
 
-    this.fieldNameBuilders.put(fieldName, builder);
+    this.fieldNameBuilders.put(fieldName.toString(), builder);
+
 
   }
 
   /**
    * Associates a class with a builder
    * 
-   * @param queryNodeClass
-   *          the class
-   * @param builder
-   *          the builder to be associated
+   * @param queryNodeClass the class
+   * @param builder the builder to be associated
    */
   public void setBuilder(Class<? extends QueryNode> queryNodeClass,
       QueryBuilder builder) {
@@ -135,8 +132,13 @@ public class QueryTreeBuilder implements
     QueryBuilder builder = null;
 
     if (this.fieldNameBuilders != null && node instanceof FieldableNode) {
+      CharSequence field = ((FieldableNode) node).getField();
+
+      if (field != null) {
+        field = field.toString();
+      }
 
-      builder = this.fieldNameBuilders.get(((FieldableNode) node).getField());
+      builder = this.fieldNameBuilders.get(field);
 
     }
 
@@ -203,14 +205,13 @@ public class QueryTreeBuilder implements
    * Builds some kind of object from a query tree. Each node in the query tree
    * is built using an specific builder associated to it.
    * 
-   * @param queryNode
-   *          the query tree root node
+   * @param queryNode the query tree root node
    * 
    * @return the built object
    * 
-   * @throws QueryNodeException
-   *           if some node builder throws a {@link QueryNodeException} or if
-   *           there is a node which had no builder associated to it
+   * @throws QueryNodeException if some node builder throws a
+   *         {@link QueryNodeException} or if there is a node which had no
+   *         builder associated to it
    */
   public Object build(QueryNode queryNode) throws QueryNodeException {
     process(queryNode);

Modified: lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/config/FieldConfig.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/config/FieldConfig.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/config/FieldConfig.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/config/FieldConfig.java Tue Jan 25 09:39:51 2011
@@ -28,17 +28,15 @@ import org.apache.lucene.util.AttributeS
  */
 public class FieldConfig extends AttributeSource {
 
-  private CharSequence fieldName;
-
+  private String fieldName;
+  
   /**
    * Constructs a {@link FieldConfig}
    * 
-   * @param fieldName
-   *          the field name, it cannot be null
-   * @throws IllegalArgumentException
-   *           if the field name is null
+   * @param fieldName the field name, it cannot be null
+   * @throws IllegalArgumentException if the field name is null
    */
-  public FieldConfig(CharSequence fieldName) {
+  public FieldConfig(String fieldName) {
 
     if (fieldName == null) {
       throw new IllegalArgumentException("field name should not be null!");
@@ -53,13 +51,14 @@ public class FieldConfig extends Attribu
    * 
    * @return the field name
    */
-  public CharSequence getFieldName() {
+  public String getField() {
     return this.fieldName;
   }
-  
+
   @Override
-  public String toString(){
-    return "<fieldconfig name=\"" + this.fieldName + "\" attributes=\"" + super.toString() + "\"/>";
+  public String toString() {
+    return "<fieldconfig name=\"" + this.fieldName + "\" attributes=\""
+        + super.toString() + "\"/>";
   }
 
 }

Modified: lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/config/QueryConfigHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/config/QueryConfigHandler.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/config/QueryConfigHandler.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/config/QueryConfigHandler.java Tue Jan 25 09:39:51 2011
@@ -46,7 +46,7 @@ import org.apache.lucene.util.AttributeS
 public abstract class QueryConfigHandler extends AttributeSource {
 
   private LinkedList<FieldConfigListener> listeners = new LinkedList<FieldConfigListener>();
-
+  
   /**
    * Returns an implementation of
    * {@link FieldConfig} for a specific field name. If the implemented
@@ -60,7 +60,7 @@ public abstract class QueryConfigHandler
    *         configuration or <code>null</code>, if the implemented
    *         {@link QueryConfigHandler} has no configuration for that field
    */
-  public FieldConfig getFieldConfig(CharSequence fieldName) {
+  public FieldConfig getFieldConfig(String fieldName) {
     FieldConfig fieldConfig = new FieldConfig(fieldName);
 
     for (FieldConfigListener listener : this.listeners) {

Modified: lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QueryNode.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QueryNode.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QueryNode.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QueryNode.java Tue Jan 25 09:39:51 2011
@@ -43,14 +43,14 @@ public interface QueryNode extends Seria
   public boolean isLeaf();
 
   /** verify if a node contains a tag */
-  public boolean containsTag(CharSequence tagName);
-
+  public boolean containsTag(String tagName);
+  
   /**
    * @param tagName
    * @return of stored on under that tag name
    */
-  public Object getTag(CharSequence tagName);
-
+  public Object getTag(String tagName);
+  
   public QueryNode getParent();
 
   /**
@@ -81,15 +81,20 @@ public interface QueryNode extends Seria
    * @param tagName
    * @param value
    */
-  public void setTag(CharSequence tagName, Object value);
-
+  public void setTag(String tagName, Object value);
+  
   /**
    * Unset a tag. tagName will be converted to lowercase.
    * 
    * @param tagName
    */
-  public void unsetTag(CharSequence tagName);
-
-  public Map<CharSequence, Object> getTags();
+  public void unsetTag(String tagName);
+  
+  /**
+   * Returns a map containing all tags attached to this query node. 
+   * 
+   * @return a map containing all tags attached to this query node
+   */
+  public Map<String, Object> getTagMap();
 
 }

Modified: lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QueryNodeImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QueryNodeImpl.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QueryNodeImpl.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QueryNodeImpl.java Tue Jan 25 09:39:51 2011
@@ -25,6 +25,7 @@ import java.util.ResourceBundle;
 
 import org.apache.lucene.messages.NLS;
 import org.apache.lucene.queryParser.core.messages.QueryParserMessages;
+import org.apache.lucene.queryParser.core.util.StringUtils;
 
 /**
  * A {@link QueryNodeImpl} is the default implementation of the interface
@@ -40,7 +41,7 @@ public abstract class QueryNodeImpl impl
 
   private boolean isLeaf = true;
 
-  private Hashtable<CharSequence, Object> tags = new Hashtable<CharSequence, Object>();
+  private Hashtable<String, Object> tags = new Hashtable<String, Object>();
 
   private List<QueryNode> clauses = null;
 
@@ -117,7 +118,7 @@ public abstract class QueryNodeImpl impl
     clone.isLeaf = this.isLeaf;
 
     // Reset all tags
-    clone.tags = new Hashtable<CharSequence, Object>();
+    clone.tags = new Hashtable<String, Object>();
 
     // copy children
     if (this.clauses != null) {
@@ -151,19 +152,20 @@ public abstract class QueryNodeImpl impl
     return this.clauses;
   }
 
-  public void setTag(CharSequence tagName, Object value) {
-    this.tags.put(tagName.toString().toLowerCase(), value);
+  public void setTag(String tagName, Object value) {
+    this.tags.put(tagName.toLowerCase(), value);
   }
 
-  public void unsetTag(CharSequence tagName) {
-    this.tags.remove(tagName.toString().toLowerCase());
+  public void unsetTag(String tagName) {
+    this.tags.remove(tagName.toLowerCase());
   }
 
-  public boolean containsTag(CharSequence tagName) {
-    return this.tags.containsKey(tagName.toString().toLowerCase());
+  /** verify if a node contains a tag */
+  public boolean containsTag(String tagName) {
+    return this.tags.containsKey(tagName);
   }
 
-  public Object getTag(CharSequence tagName) {
+  public Object getTag(String tagName) {
     return this.tags.get(tagName.toString().toLowerCase());
   }
 
@@ -189,16 +191,20 @@ public abstract class QueryNodeImpl impl
   /**
    * This method is use toQueryString to detect if fld is the default field
    * 
-   * @param fld
-   *          - field name
+   * @param fld - field name
    * @return true if fld is the default field
    */
+  // TODO: remove this method, it's commonly used by {@link
+  // #toQueryString(org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax)}
+  // to figure out what is the default field, however, {@link
+  // #toQueryString(org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax)}
+  // should receive the default field value directly by parameter
   protected boolean isDefaultField(CharSequence fld) {
     if (this.toQueryStringIgnoreFields)
       return true;
     if (fld == null)
       return true;
-    if (QueryNodeImpl.PLAINTEXT_FIELD_NAME.equals(fld.toString()))
+    if (QueryNodeImpl.PLAINTEXT_FIELD_NAME.equals(StringUtils.toString(fld)))
       return true;
     return false;
   }
@@ -216,12 +222,13 @@ public abstract class QueryNodeImpl impl
   }
 
   /**
-   * @see org.apache.lucene.queryParser.core.nodes.QueryNode#getTag(CharSequence)
-   * @return a Map with all tags for this QueryNode
+   * Returns a map containing all tags attached to this query node.
+   * 
+   * @return a map containing all tags attached to this query node
    */
-  @SuppressWarnings( { "unchecked" })
-  public Map<CharSequence, Object> getTags() {
-    return (Map<CharSequence, Object>) this.tags.clone();
+  @SuppressWarnings("unchecked")
+  public Map<String, Object> getTagMap() {
+    return (Map<String, Object>) this.tags.clone();
   }
 
 } // end class QueryNodeImpl

Modified: lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/StandardBooleanQueryNodeBuilder.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/StandardBooleanQueryNodeBuilder.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/StandardBooleanQueryNodeBuilder.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/StandardBooleanQueryNodeBuilder.java Tue Jan 25 09:39:51 2011
@@ -31,7 +31,7 @@ import org.apache.lucene.queryParser.sta
 import org.apache.lucene.search.BooleanClause;
 import org.apache.lucene.search.BooleanQuery;
 import org.apache.lucene.search.Query;
-import org.apache.lucene.search.Similarity;
+import org.apache.lucene.search.SimilarityProvider;
 import org.apache.lucene.search.BooleanQuery.TooManyClauses;
 
 /**
@@ -41,7 +41,7 @@ import org.apache.lucene.search.BooleanQ
  * 
  * @see BooleanQueryNodeBuilder
  * @see BooleanQuery
- * @see Similarity#coord(int, int)
+ * @see SimilarityProvider#coord(int, int)
  */
 public class StandardBooleanQueryNodeBuilder implements StandardQueryBuilder {
 

Modified: lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldBoostMapFCListener.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldBoostMapFCListener.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldBoostMapFCListener.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldBoostMapFCListener.java Tue Jan 25 09:39:51 2011
@@ -47,7 +47,7 @@ public class FieldBoostMapFCListener imp
       FieldBoostMapAttribute fieldBoostMapAttr = this.config.getAttribute(FieldBoostMapAttribute.class);
       BoostAttribute boostAttr = fieldConfig.addAttribute(BoostAttribute.class);
       
-      Float boost = fieldBoostMapAttr.getFieldBoostMap().get(fieldConfig.getFieldName());
+      Float boost = fieldBoostMapAttr.getFieldBoostMap().get(fieldConfig.getField());
 
       if (boost != null) {
         boostAttr.setBoost(boost.floatValue());

Modified: lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldDateResolutionFCListener.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldDateResolutionFCListener.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldDateResolutionFCListener.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldDateResolutionFCListener.java Tue Jan 25 09:39:51 2011
@@ -53,7 +53,7 @@ public class FieldDateResolutionFCListen
       FieldDateResolutionMapAttribute dateResMapAttr = this.config
           .addAttribute(FieldDateResolutionMapAttribute.class);
       dateRes = dateResMapAttr.getFieldDateResolutionMap().get(
-          fieldConfig.getFieldName().toString());
+          fieldConfig.getField());
     }
 
     if (dateRes == null) {

Modified: lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiTermRewriteMethodAttribute.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiTermRewriteMethodAttribute.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiTermRewriteMethodAttribute.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiTermRewriteMethodAttribute.java Tue Jan 25 09:39:51 2011
@@ -32,7 +32,7 @@ import org.apache.lucene.util.Attribute;
  */
 public interface MultiTermRewriteMethodAttribute extends Attribute {
   
-  public static final CharSequence TAG_ID = "MultiTermRewriteMethodAttribute";
+  public static final String TAG_ID = "MultiTermRewriteMethodAttribute";
   
   public void setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod method);
 

Modified: lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/StandardBooleanQueryNode.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/StandardBooleanQueryNode.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/StandardBooleanQueryNode.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/StandardBooleanQueryNode.java Tue Jan 25 09:39:51 2011
@@ -22,14 +22,14 @@ import java.util.List;
 import org.apache.lucene.queryParser.core.nodes.BooleanQueryNode;
 import org.apache.lucene.queryParser.core.nodes.QueryNode;
 import org.apache.lucene.search.BooleanQuery;
-import org.apache.lucene.search.Similarity;
+import org.apache.lucene.search.SimilarityProvider;
 
 /**
  * A {@link StandardBooleanQueryNode} has the same behavior as
  * {@link BooleanQueryNode}. It only indicates if the coord should be enabled or
  * not for this boolean query. <br/>
  * 
- * @see Similarity#coord(int, int)
+ * @see SimilarityProvider#coord(int, int)
  * @see BooleanQuery
  */
 public class StandardBooleanQueryNode extends BooleanQueryNode {

Modified: lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/processors/BoostQueryNodeProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/processors/BoostQueryNodeProcessor.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/processors/BoostQueryNodeProcessor.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/processors/BoostQueryNodeProcessor.java Tue Jan 25 09:39:51 2011
@@ -26,6 +26,7 @@ import org.apache.lucene.queryParser.cor
 import org.apache.lucene.queryParser.core.nodes.FieldableNode;
 import org.apache.lucene.queryParser.core.nodes.QueryNode;
 import org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl;
+import org.apache.lucene.queryParser.core.util.StringUtils;
 import org.apache.lucene.queryParser.standard.config.BoostAttribute;
 
 /**
@@ -49,7 +50,8 @@ public class BoostQueryNodeProcessor ext
       QueryConfigHandler config = getQueryConfigHandler();
 
       if (config != null) {
-        FieldConfig fieldConfig = config.getFieldConfig(fieldNode.getField());
+        CharSequence field = fieldNode.getField();
+        FieldConfig fieldConfig = config.getFieldConfig(StringUtils.toString(field));
 
         if (fieldConfig != null && fieldConfig.hasAttribute(BoostAttribute.class)) {
           BoostAttribute boostAttr = fieldConfig.getAttribute(BoostAttribute.class);

Modified: lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/processors/ParametricRangeQueryNodeProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/processors/ParametricRangeQueryNodeProcessor.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/processors/ParametricRangeQueryNodeProcessor.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/processors/ParametricRangeQueryNodeProcessor.java Tue Jan 25 09:39:51 2011
@@ -97,8 +97,15 @@ public class ParametricRangeQueryNodePro
 
       }
 
-      FieldConfig fieldConfig = getQueryConfigHandler().getFieldConfig(
-          parametricRangeNode.getField());
+      CharSequence field = parametricRangeNode.getField();
+      String fieldStr = null;
+
+      if (field != null) {
+        fieldStr = field.toString();
+      }
+
+      FieldConfig fieldConfig = getQueryConfigHandler()
+          .getFieldConfig(fieldStr);
 
       if (fieldConfig != null) {
 

Modified: lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/spans/SpansQueryConfigHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/spans/SpansQueryConfigHandler.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/spans/SpansQueryConfigHandler.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/spans/SpansQueryConfigHandler.java Tue Jan 25 09:39:51 2011
@@ -33,7 +33,7 @@ public class SpansQueryConfigHandler ext
   }
 
   @Override
-  public FieldConfig getFieldConfig(CharSequence fieldName) {
+  public FieldConfig getFieldConfig(String fieldName) {
 
     // there is no field configuration, always return null
     return null;

Modified: lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/CompoundFileWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/CompoundFileWriter.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/CompoundFileWriter.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/CompoundFileWriter.java Tue Jan 25 09:39:51 2011
@@ -17,16 +17,16 @@ package org.apache.lucene.index;
  * limitations under the License.
  */
 
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.LinkedList;
+
+import org.apache.lucene.index.codecs.MergeState;
 import org.apache.lucene.store.Directory;
-import org.apache.lucene.store.IndexOutput;
 import org.apache.lucene.store.IndexInput;
+import org.apache.lucene.store.IndexOutput;
 import org.apache.lucene.util.IOUtils;
 
-import java.util.LinkedList;
-import java.util.HashSet;
-
-import java.io.IOException;
-
 /**
  * Combines multiple files into a single compound file.
  * The file format:<br>
@@ -76,7 +76,7 @@ final class CompoundFileWriter {
     private HashSet<String> ids;
     private LinkedList<FileEntry> entries;
     private boolean merged = false;
-    private SegmentMerger.CheckAbort checkAbort;
+    private MergeState.CheckAbort checkAbort;
 
     /** Create the compound stream in the specified file. The file name is the
      *  entire name (no extensions are added).
@@ -86,7 +86,7 @@ final class CompoundFileWriter {
       this(dir, name, null);
     }
 
-    CompoundFileWriter(Directory dir, String name, SegmentMerger.CheckAbort checkAbort) {
+    CompoundFileWriter(Directory dir, String name, MergeState.CheckAbort checkAbort) {
         if (dir == null)
             throw new NullPointerException("directory cannot be null");
         if (name == null)

Modified: lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/DocumentsWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/DocumentsWriter.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/DocumentsWriter.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/DocumentsWriter.java Tue Jan 25 09:39:51 2011
@@ -30,7 +30,7 @@ import java.util.concurrent.atomic.Atomi
 import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.document.Document;
 import org.apache.lucene.search.Query;
-import org.apache.lucene.search.Similarity;
+import org.apache.lucene.search.SimilarityProvider;
 import org.apache.lucene.store.AlreadyClosedException;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.RAMFile;
@@ -127,7 +127,7 @@ final class DocumentsWriter {
   private boolean aborting;               // True if an abort is pending
 
   PrintStream infoStream;
-  Similarity similarity;
+  SimilarityProvider similarityProvider;
 
   // max # simultaneous threads; if there are more than
   // this, they wait for others to finish first
@@ -140,7 +140,7 @@ final class DocumentsWriter {
     DocumentsWriter docWriter;
     Analyzer analyzer;
     PrintStream infoStream;
-    Similarity similarity;
+    SimilarityProvider similarityProvider;
     int docID;
     Document doc;
     String maxTermPrefix;
@@ -284,7 +284,7 @@ final class DocumentsWriter {
   DocumentsWriter(Directory directory, IndexWriter writer, IndexingChain indexingChain, int maxThreadStates, FieldInfos fieldInfos, BufferedDeletes bufferedDeletes) throws IOException {
     this.directory = directory;
     this.writer = writer;
-    this.similarity = writer.getConfig().getSimilarity();
+    this.similarityProvider = writer.getConfig().getSimilarityProvider();
     this.maxThreadStates = maxThreadStates;
     this.fieldInfos = fieldInfos;
     this.bufferedDeletes = bufferedDeletes;
@@ -357,10 +357,10 @@ final class DocumentsWriter {
     }
   }
 
-  synchronized void setSimilarity(Similarity similarity) {
-    this.similarity = similarity;
+  synchronized void setSimilarityProvider(SimilarityProvider similarity) {
+    this.similarityProvider = similarity;
     for(int i=0;i<threadStates.length;i++) {
-      threadStates[i].docState.similarity = similarity;
+      threadStates[i].docState.similarityProvider = similarity;
     }
   }
 

Modified: lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/DocumentsWriterThreadState.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/DocumentsWriterThreadState.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/DocumentsWriterThreadState.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/DocumentsWriterThreadState.java Tue Jan 25 09:39:51 2011
@@ -36,7 +36,7 @@ final class DocumentsWriterThreadState {
     this.docWriter = docWriter;
     docState = new DocumentsWriter.DocState();
     docState.infoStream = docWriter.infoStream;
-    docState.similarity = docWriter.similarity;
+    docState.similarityProvider = docWriter.similarityProvider;
     docState.docWriter = docWriter;
     consumer = docWriter.consumer.addThread(this);
   }

Modified: lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/IndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/IndexWriter.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/IndexWriter.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/IndexWriter.java Tue Jan 25 09:39:51 2011
@@ -333,7 +333,6 @@ public class IndexWriter implements Clos
    * @throws IOException
    */
   IndexReader getReader() throws IOException {
-
     ensureOpen();
 
     final long tStart = System.currentTimeMillis();
@@ -1049,8 +1048,9 @@ public class IndexWriter implements Clos
   private void closeInternal(boolean waitForMerges) throws CorruptIndexException, IOException {
 
     try {
-      if (infoStream != null)
-        message("now flush at close");
+      if (infoStream != null) {
+        message("now flush at close waitForMerges=" + waitForMerges);
+      }
 
       docWriter.close();
 
@@ -2020,12 +2020,19 @@ public class IndexWriter implements Clos
    *    will have completed once this method completes.</p>
    */
   public synchronized void waitForMerges() {
+    if (infoStream != null) {
+      message("waitForMerges");
+    }
     while(pendingMerges.size() > 0 || runningMerges.size() > 0) {
       doWait();
     }
 
     // sanity check
     assert 0 == mergingSegments.size();
+
+    if (infoStream != null) {
+      message("waitForMerges done");
+    }
   }
 
   /**

Modified: lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/IndexWriterConfig.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/IndexWriterConfig.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/IndexWriterConfig.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/IndexWriterConfig.java Tue Jan 25 09:39:51 2011
@@ -21,7 +21,8 @@ import org.apache.lucene.analysis.Analyz
 import org.apache.lucene.index.DocumentsWriter.IndexingChain;
 import org.apache.lucene.index.IndexWriter.IndexReaderWarmer;
 import org.apache.lucene.index.codecs.CodecProvider;
-import org.apache.lucene.search.Similarity;
+import org.apache.lucene.search.IndexSearcher;
+import org.apache.lucene.search.SimilarityProvider;
 import org.apache.lucene.util.Version;
 
 /**
@@ -111,7 +112,7 @@ public final class IndexWriterConfig imp
   private IndexDeletionPolicy delPolicy;
   private IndexCommit commit;
   private OpenMode openMode;
-  private Similarity similarity;
+  private SimilarityProvider similarityProvider;
   private int termIndexInterval; // TODO: this should be private to the codec, not settable here
   private MergeScheduler mergeScheduler;
   private long writeLockTimeout;
@@ -142,7 +143,7 @@ public final class IndexWriterConfig imp
     delPolicy = new KeepOnlyLastCommitDeletionPolicy();
     commit = null;
     openMode = OpenMode.CREATE_OR_APPEND;
-    similarity = Similarity.getDefault();
+    similarityProvider = IndexSearcher.getDefaultSimilarityProvider();
     termIndexInterval = DEFAULT_TERM_INDEX_INTERVAL; // TODO: this should be private to the codec, not settable here
     mergeScheduler = new ConcurrentMergeScheduler();
     writeLockTimeout = WRITE_LOCK_TIMEOUT;
@@ -234,25 +235,22 @@ public final class IndexWriterConfig imp
   }
 
   /**
-   * Expert: set the {@link Similarity} implementation used by this IndexWriter.
+   * Expert: set the {@link SimilarityProvider} implementation used by this IndexWriter.
    * <p>
-   * <b>NOTE:</b> the similarity cannot be null. If <code>null</code> is passed,
-   * the similarity will be set to the default.
-   * 
-   * @see Similarity#setDefault(Similarity)
+   * <b>NOTE:</b> the similarity provider cannot be null. If <code>null</code> is passed,
+   * the similarity provider will be set to the default implementation (unspecified).
    */
-  public IndexWriterConfig setSimilarity(Similarity similarity) {
-    this.similarity = similarity == null ? Similarity.getDefault() : similarity;
+  public IndexWriterConfig setSimilarityProvider(SimilarityProvider similarityProvider) {
+    this.similarityProvider = similarityProvider == null ? IndexSearcher.getDefaultSimilarityProvider() : similarityProvider;
     return this;
   }
 
   /**
-   * Expert: returns the {@link Similarity} implementation used by this
-   * IndexWriter. This defaults to the current value of
-   * {@link Similarity#getDefault()}.
+   * Expert: returns the {@link SimilarityProvider} implementation used by this
+   * IndexWriter.
    */
-  public Similarity getSimilarity() {
-    return similarity;
+  public SimilarityProvider getSimilarityProvider() {
+    return similarityProvider;
   }
   
   /**
@@ -576,7 +574,7 @@ public final class IndexWriterConfig imp
     sb.append("delPolicy=").append(delPolicy.getClass().getName()).append("\n");
     sb.append("commit=").append(commit == null ? "null" : commit).append("\n");
     sb.append("openMode=").append(openMode).append("\n");
-    sb.append("similarity=").append(similarity.getClass().getName()).append("\n");
+    sb.append("similarityProvider=").append(similarityProvider.getClass().getName()).append("\n");
     sb.append("termIndexInterval=").append(termIndexInterval).append("\n"); // TODO: this should be private to the codec, not settable here
     sb.append("mergeScheduler=").append(mergeScheduler.getClass().getName()).append("\n");
     sb.append("default WRITE_LOCK_TIMEOUT=").append(WRITE_LOCK_TIMEOUT).append("\n");

Modified: lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/LogMergePolicy.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/LogMergePolicy.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/LogMergePolicy.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/LogMergePolicy.java Tue Jan 25 09:39:51 2011
@@ -481,6 +481,7 @@ public abstract class LogMergePolicy ext
       if (size < 1)
         size = 1;
       levels[i] = (float) Math.log(size)/norm;
+      message("seg " + info.name + " level=" + levels[i]);
     }
 
     final float levelFloor;

Modified: lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/MergePolicy.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/MergePolicy.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/MergePolicy.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/MergePolicy.java Tue Jan 25 09:39:51 2011
@@ -110,7 +110,7 @@ public abstract class MergePolicy implem
       return aborted;
     }
 
-    synchronized void checkAborted(Directory dir) throws MergeAbortedException {
+    public synchronized void checkAborted(Directory dir) throws MergeAbortedException {
       if (aborted) {
         throw new MergeAbortedException("merge is aborted: " + segString(dir));
       }

Modified: lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/NormsWriterPerField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/NormsWriterPerField.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/NormsWriterPerField.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/NormsWriterPerField.java Tue Jan 25 09:39:51 2011
@@ -17,6 +17,7 @@ package org.apache.lucene.index;
  * limitations under the License.
  */
 
+import org.apache.lucene.search.Similarity;
 import org.apache.lucene.util.ArrayUtil;
 
 /** Taps into DocInverter, as an InvertedDocEndConsumer,
@@ -29,7 +30,8 @@ final class NormsWriterPerField extends 
   final NormsWriterPerThread perThread;
   final FieldInfo fieldInfo;
   final DocumentsWriter.DocState docState;
-
+  final Similarity similarity;
+  
   // Holds all docID/norm pairs we've seen
   int[] docIDs = new int[1];
   byte[] norms = new byte[1];
@@ -49,6 +51,7 @@ final class NormsWriterPerField extends 
     this.fieldInfo = fieldInfo;
     docState = perThread.docState;
     fieldState = docInverterPerField.fieldState;
+    similarity = docState.similarityProvider.get(fieldInfo.name);
   }
 
   @Override
@@ -71,8 +74,8 @@ final class NormsWriterPerField extends 
         assert norms.length == upto;
         norms = ArrayUtil.grow(norms, 1+upto);
       }
-      final float norm = docState.similarity.computeNorm(fieldInfo.name, fieldState);
-      norms[upto] = docState.similarity.encodeNormValue(norm);
+      final float norm = similarity.computeNorm(fieldInfo.name, fieldState);
+      norms[upto] = similarity.encodeNormValue(norm);
       docIDs[upto] = docState.docID;
       upto++;
     }

Modified: lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/SegmentDeletes.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/SegmentDeletes.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/SegmentDeletes.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/SegmentDeletes.java Tue Jan 25 09:39:51 2011
@@ -140,8 +140,11 @@ class SegmentDeletes {
   }
 
   public void addQuery(Query query, int docIDUpto) {
-    queries.put(query, docIDUpto);
-    bytesUsed.addAndGet(BYTES_PER_DEL_QUERY);
+    Integer current = queries.put(query, docIDUpto);
+    // increment bytes used only if the query wasn't added so far.
+    if (current == null) {
+      bytesUsed.addAndGet(BYTES_PER_DEL_QUERY);
+    }
   }
 
   public void addDocID(int docID) {

Modified: lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/SegmentMerger.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/SegmentMerger.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/SegmentMerger.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/SegmentMerger.java Tue Jan 25 09:39:51 2011
@@ -59,7 +59,7 @@ final class SegmentMerger {
   
   private int mergedDocs;
 
-  private final CheckAbort checkAbort;
+  private final MergeState.CheckAbort checkAbort;
 
   /** Maximum number of contiguous documents to bulk-copy
       when merging stored fields */
@@ -78,9 +78,9 @@ final class SegmentMerger {
     this.fieldInfos = fieldInfos;
     segment = name;
     if (merge != null) {
-      checkAbort = new CheckAbort(merge, directory);
+      checkAbort = new MergeState.CheckAbort(merge, directory);
     } else {
-      checkAbort = new CheckAbort(null, null) {
+      checkAbort = new MergeState.CheckAbort(null, null) {
         @Override
         public void work(double units) throws MergeAbortedException {
           // do nothing
@@ -508,6 +508,7 @@ final class SegmentMerger {
     mergeState.hasPayloadProcessorProvider = payloadProcessorProvider != null;
     mergeState.dirPayloadProcessor = new PayloadProcessorProvider.DirPayloadProcessor[mergeState.readerCount];
     mergeState.currentPayloadProcessor = new PayloadProcessorProvider.PayloadProcessor[mergeState.readerCount];
+    mergeState.checkAbort = checkAbort;
 
     docBase = 0;
     int inputDocBase = 0;
@@ -612,31 +613,4 @@ final class SegmentMerger {
       }
     }
   }
-
-  static class CheckAbort {
-    private double workCount;
-    private MergePolicy.OneMerge merge;
-    private Directory dir;
-    public CheckAbort(MergePolicy.OneMerge merge, Directory dir) {
-      this.merge = merge;
-      this.dir = dir;
-    }
-
-    /**
-     * Records the fact that roughly units amount of work
-     * have been done since this method was last called.
-     * When adding time-consuming code into SegmentMerger,
-     * you should test different values for units to ensure
-     * that the time in between calls to merge.checkAborted
-     * is up to ~ 1 second.
-     */
-    public void work(double units) throws MergePolicy.MergeAbortedException {
-      workCount += units;
-      if (workCount >= 10000.0) {
-        merge.checkAborted(dir);
-        workCount = 0;
-      }
-    }
-  }
-  
 }

Modified: lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/codecs/BlockTermsReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/codecs/BlockTermsReader.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/codecs/BlockTermsReader.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/codecs/BlockTermsReader.java Tue Jan 25 09:39:51 2011
@@ -515,7 +515,7 @@ public class BlockTermsReader extends Fi
          metadata, ie docFreq, totalTermFreq or pulls a D/&PEnum, we then (lazily)
          decode all metadata up to the current term. */
       private BytesRef _next() throws IOException {
-        //System.out.println("BTR._next this=" + this + " termCount=" + state.termCount + " (vs " + state.blockTermCount + ")");
+        //System.out.println("BTR._next seg=" + segment + " this=" + this + " termCount=" + state.termCount + " (vs " + state.blockTermCount + ")");
         if (state.termCount == state.blockTermCount) {
           if (!nextBlock()) {
             //System.out.println("  eof");

Modified: lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/codecs/MergeState.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/codecs/MergeState.java?rev=1063188&r1=1063187&r2=1063188&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/codecs/MergeState.java (original)
+++ lucene/dev/branches/bulkpostings/lucene/src/java/org/apache/lucene/index/codecs/MergeState.java Tue Jan 25 09:39:51 2011
@@ -17,13 +17,16 @@ package org.apache.lucene.index.codecs;
  * limitations under the License.
  */
 
+import java.util.List;
+
 import org.apache.lucene.index.FieldInfo;
 import org.apache.lucene.index.FieldInfos;
 import org.apache.lucene.index.IndexReader;
+import org.apache.lucene.index.MergePolicy;
 import org.apache.lucene.index.PayloadProcessorProvider.DirPayloadProcessor;
 import org.apache.lucene.index.PayloadProcessorProvider.PayloadProcessor;
+import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.Bits;
-import java.util.List;
 
 /** Holds common state used during segment merging
  *
@@ -37,6 +40,7 @@ public class MergeState {
   public int[] docBase;                           // New docID base per reader
   public int mergedDocCount;                      // Total # merged docs
   public Bits multiDeletedDocs;
+  public CheckAbort checkAbort;
 
   // Updated per field;
   public FieldInfo fieldInfo;
@@ -45,5 +49,30 @@ public class MergeState {
   public boolean hasPayloadProcessorProvider;
   public DirPayloadProcessor[] dirPayloadProcessor;
   public PayloadProcessor[] currentPayloadProcessor;
-  
+
+  public static class CheckAbort {
+    private double workCount;
+    private MergePolicy.OneMerge merge;
+    private Directory dir;
+    public CheckAbort(MergePolicy.OneMerge merge, Directory dir) {
+      this.merge = merge;
+      this.dir = dir;
+    }
+
+    /**
+     * Records the fact that roughly units amount of work
+     * have been done since this method was last called.
+     * When adding time-consuming code into SegmentMerger,
+     * you should test different values for units to ensure
+     * that the time in between calls to merge.checkAborted
+     * is up to ~ 1 second.
+     */
+    public void work(double units) throws MergePolicy.MergeAbortedException {
+      workCount += units;
+      if (workCount >= 10000.0) {
+        merge.checkAborted(dir);
+        workCount = 0;
+      }
+    }
+  }
 }



Mime
View raw message