You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2013/01/29 01:40:15 UTC

svn commit: r1439721 - in /lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index: SortedDocValues.java SortedDocValuesTermsEnum.java

Author: mikemccand
Date: Tue Jan 29 00:40:14 2013
New Revision: 1439721

URL: http://svn.apache.org/viewvc?rev=1439721&view=rev
Log:
remove 2 nocommits, add 1

Modified:
    lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/SortedDocValues.java
    lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/SortedDocValuesTermsEnum.java

Modified: lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/SortedDocValues.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/SortedDocValues.java?rev=1439721&r1=1439720&r2=1439721&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/SortedDocValues.java (original)
+++ lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/SortedDocValues.java Tue Jan 29 00:40:14 2013
@@ -110,20 +110,10 @@ public abstract class SortedDocValues ex
       } else if (cmp > 0) {
         high = mid - 1;
       } else {
-        // nocommit: we shouldnt have to set spare at all if its actually a spare, but its not!
-        // ant test  -Dtestcase=TestFieldCacheRewriteMethod -Dtests.method=testRegexps -Dtests.seed=AFC4A08B212CE143 -Dtests.slow=true -Dtests.locale=th -Dtests.timezone=Canada/Mountain -Dtests.file.encoding=ISO-8859-1
-        spare.bytes = BytesRef.EMPTY_BYTES;
-        spare.offset = 0;
-        spare.length = 0;
         return mid; // key found
       }
     }
 
-    // nocommit: we shouldnt have to set spare at all if its actually a spare, but its not!
-    // ant test  -Dtestcase=TestFieldCacheRewriteMethod -Dtests.method=testRegexps -Dtests.seed=AFC4A08B212CE143 -Dtests.slow=true -Dtests.locale=th -Dtests.timezone=Canada/Mountain -Dtests.file.encoding=ISO-8859-1
-    spare.bytes = BytesRef.EMPTY_BYTES;
-    spare.offset = 0;
-    spare.length = 0;
     return -(low + 1);  // key not found.
   }
 }

Modified: lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/SortedDocValuesTermsEnum.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/SortedDocValuesTermsEnum.java?rev=1439721&r1=1439720&r2=1439721&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/SortedDocValuesTermsEnum.java (original)
+++ lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/SortedDocValuesTermsEnum.java Tue Jan 29 00:40:14 2013
@@ -42,6 +42,10 @@ public class SortedDocValuesTermsEnum ex
     if (ord >= 0) {
       currentOrd = ord;
       term.offset = 0;
+      // nocommit is there cleaner way ...
+      // term.bytes may be pointing to codec-private byte[]
+      // storage, so we must force new byte[] allocation:
+      term.bytes = new byte[text.length];
       term.copyBytes(text);
       return SeekStatus.FOUND;
     } else {
@@ -60,7 +64,6 @@ public class SortedDocValuesTermsEnum ex
   public boolean seekExact(BytesRef text, boolean useCache) throws IOException {
     int ord = values.lookupTerm(text, term);
     if (ord >= 0) {
-      term.copyBytes(text);
       currentOrd = ord;
       return true;
     } else {