lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r889730 - in /lucene/java/branches/flex_1458: common-build.xml src/java/org/apache/lucene/index/DirectoryReader.java
Date Fri, 11 Dec 2009 17:55:38 GMT
Author: mikemccand
Date: Fri Dec 11 17:55:37 2009
New Revision: 889730

URL: http://svn.apache.org/viewvc?rev=889730&view=rev
Log:
LUCENE-2111 (on flex branch): re-enable DirReader's single reader optimization & fix back-compat
test

Modified:
    lucene/java/branches/flex_1458/common-build.xml
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DirectoryReader.java

Modified: lucene/java/branches/flex_1458/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/common-build.xml?rev=889730&r1=889729&r2=889730&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/common-build.xml (original)
+++ lucene/java/branches/flex_1458/common-build.xml Fri Dec 11 17:55:37 2009
@@ -42,7 +42,7 @@
   <property name="Name" value="Lucene"/>
   <property name="dev.version" value="3.1-dev"/>
   <property name="version" value="${dev.version}"/>
-  <property name="compatibility.tag" value="flex_1458_3_0_back_compat_tests_20091211"/>
+  <property name="compatibility.tag" value="flex_1458_3_0_back_compat_tests_20091211a"/>
   <property name="spec.version" value="${version}"/>	
   <property name="year" value="2000-${current.year}"/>
   <property name="final.name" value="lucene-${name}-${version}"/>

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DirectoryReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DirectoryReader.java?rev=889730&r1=889729&r2=889730&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DirectoryReader.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DirectoryReader.java Fri
Dec 11 17:55:37 2009
@@ -731,24 +731,23 @@
   public TermEnum terms() throws IOException {
     ensureOpen();
     //nocommit: investigate this opto
-//    if (subReaders.length == 1) {
+    if (subReaders.length == 1) {
       // Optimize single segment case:
-//      return subReaders[0].terms();
-//    } else {
-      return new MultiTermEnum(this, subReaders, starts, null);
-//    }
+      return subReaders[0].terms();
+    } else {
+     return new MultiTermEnum(this, subReaders, starts, null);
+    }
   }
 
   @Override
   public TermEnum terms(Term term) throws IOException {
     ensureOpen();
-    //nocommit: investigate this opto
-//    if (subReaders.length == 1) {
+    if (subReaders.length == 1) {
       // Optimize single segment case:
-//      return subReaders[0].terms(term);
-//    } else {
+      return subReaders[0].terms(term);
+    } else {
       return new MultiTermEnum(this, subReaders, starts, term);
-//    }
+    }
   }
 
   @Override



Mime
View raw message