lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1441181 - in /lucene/dev/branches/lucene4547: lucene/core/src/java/org/apache/lucene/codecs/lucene42/ lucene/core/src/java/org/apache/lucene/index/ lucene/core/src/java/org/apache/lucene/search/ lucene/grouping/src/java/org/apache/lucene/s...
Date Thu, 31 Jan 2013 20:32:38 GMT
Author: mikemccand
Date: Thu Jan 31 20:32:37 2013
New Revision: 1441181

URL: http://svn.apache.org/viewvc?rev=1441181&view=rev
Log:
fix nocommits

Modified:
    lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42DocValuesProducer.java
    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
    lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/search/FieldCacheRangeFilter.java
    lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/search/FieldCacheTermsFilter.java
    lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/search/FieldComparator.java
    lucene/dev/branches/lucene4547/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermAllGroupHeadsCollector.java
    lucene/dev/branches/lucene4547/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermAllGroupsCollector.java
    lucene/dev/branches/lucene4547/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermDistinctValuesCollector.java
    lucene/dev/branches/lucene4547/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermGroupFacetCollector.java
    lucene/dev/branches/lucene4547/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermSecondPassGroupingCollector.java
    lucene/dev/branches/lucene4547/lucene/queries/src/java/org/apache/lucene/queries/function/docvalues/DocTermsIndexDocValues.java
    lucene/dev/branches/lucene4547/lucene/test-framework/src/java/org/apache/lucene/index/AssertingAtomicReader.java
    lucene/dev/branches/lucene4547/lucene/test-framework/src/java/org/apache/lucene/index/BaseDocValuesFormatTestCase.java
    lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/request/PerSegmentSingleValuedFaceting.java
    lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/request/SimpleFacets.java
    lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/search/MissingStringLastComparatorSource.java

Modified: lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42DocValuesProducer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42DocValuesProducer.java?rev=1441181&r1=1441180&r2=1441181&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42DocValuesProducer.java
(original)
+++ lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42DocValuesProducer.java
Thu Jan 31 20:32:37 2013
@@ -250,7 +250,7 @@ class Lucene42DocValuesProducer extends 
       }
 
       @Override
-      public int lookupTerm(BytesRef key, BytesRef spare) {
+      public int lookupTerm(BytesRef key) {
         try {
           InputOutput<Long> o = fstEnum.seekCeil(key);
           if (o == null) {

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=1441181&r1=1441180&r2=1441181&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
Thu Jan 31 20:32:37 2013
@@ -95,8 +95,8 @@ public abstract class SortedDocValues ex
   // nocommit: what does spare mean? its no spare: because people rely upon its return value!
   // if its 'result' then the parameter and javadoc needs changing, otherwise things need
fixing
   // unconditionally set its value to "NONSENSE" bytes to see the bugs!
-  public int lookupTerm(BytesRef key, BytesRef spare) {
-
+  public int lookupTerm(BytesRef key) {
+    BytesRef spare = new BytesRef();
     int low = 0;
     int high = getValueCount()-1;
 

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=1441181&r1=1441180&r2=1441181&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
Thu Jan 31 20:32:37 2013
@@ -38,11 +38,11 @@ public class SortedDocValuesTermsEnum ex
 
   @Override
   public SeekStatus seekCeil(BytesRef text, boolean useCache /* ignored */) throws IOException
{
-    int ord = values.lookupTerm(text, term);
+    int ord = values.lookupTerm(text);
     if (ord >= 0) {
       currentOrd = ord;
       term.offset = 0;
-      // nocommit is there cleaner way ...
+      // TODO: is there a 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];
@@ -62,7 +62,7 @@ public class SortedDocValuesTermsEnum ex
 
   @Override
   public boolean seekExact(BytesRef text, boolean useCache) throws IOException {
-    int ord = values.lookupTerm(text, term);
+    int ord = values.lookupTerm(text);
     if (ord >= 0) {
       currentOrd = ord;
       return true;

Modified: lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/search/FieldCacheRangeFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/search/FieldCacheRangeFilter.java?rev=1441181&r1=1441180&r2=1441181&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/search/FieldCacheRangeFilter.java
(original)
+++ lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/search/FieldCacheRangeFilter.java
Thu Jan 31 20:32:37 2013
@@ -91,9 +91,8 @@ public abstract class FieldCacheRangeFil
       @Override
       public DocIdSet getDocIdSet(AtomicReaderContext context, Bits acceptDocs) throws IOException
{
         final SortedDocValues fcsi = FieldCache.DEFAULT.getTermsIndex(context.reader(), field);
-        final BytesRef spare = new BytesRef();
-        final int lowerPoint = lowerVal == null ? -1 : fcsi.lookupTerm(new BytesRef(lowerVal),
spare);
-        final int upperPoint = upperVal == null ? -1 : fcsi.lookupTerm(new BytesRef(upperVal),
spare);
+        final int lowerPoint = lowerVal == null ? -1 : fcsi.lookupTerm(new BytesRef(lowerVal));
+        final int upperPoint = upperVal == null ? -1 : fcsi.lookupTerm(new BytesRef(upperVal));
 
         final int inclusiveLowerPoint, inclusiveUpperPoint;
 
@@ -149,9 +148,8 @@ public abstract class FieldCacheRangeFil
       @Override
       public DocIdSet getDocIdSet(AtomicReaderContext context, Bits acceptDocs) throws IOException
{
         final SortedDocValues fcsi = FieldCache.DEFAULT.getTermsIndex(context.reader(), field);
-        final BytesRef spare = new BytesRef();
-        final int lowerPoint = lowerVal == null ? -1 : fcsi.lookupTerm(lowerVal, spare);
-        final int upperPoint = upperVal == null ? -1 : fcsi.lookupTerm(upperVal, spare);
+        final int lowerPoint = lowerVal == null ? -1 : fcsi.lookupTerm(lowerVal);
+        final int upperPoint = upperVal == null ? -1 : fcsi.lookupTerm(upperVal);
 
         final int inclusiveLowerPoint, inclusiveUpperPoint;
 

Modified: lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/search/FieldCacheTermsFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/search/FieldCacheTermsFilter.java?rev=1441181&r1=1441180&r2=1441181&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/search/FieldCacheTermsFilter.java
(original)
+++ lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/search/FieldCacheTermsFilter.java
Thu Jan 31 20:32:37 2013
@@ -121,9 +121,8 @@ public class FieldCacheTermsFilter exten
   public DocIdSet getDocIdSet(AtomicReaderContext context, Bits acceptDocs) throws IOException
{
     final SortedDocValues fcsi = getFieldCache().getTermsIndex(context.reader(), field);
     final FixedBitSet bits = new FixedBitSet(fcsi.getValueCount());
-    final BytesRef spare = new BytesRef();
     for (int i=0;i<terms.length;i++) {
-      int ord = fcsi.lookupTerm(terms[i], spare);
+      int ord = fcsi.lookupTerm(terms[i]);
       if (ord >= 0) {
         bits.set(ord);
       }

Modified: lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/search/FieldComparator.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/search/FieldComparator.java?rev=1441181&r1=1441180&r2=1441181&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/search/FieldComparator.java
(original)
+++ lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/search/FieldComparator.java
Thu Jan 31 20:32:37 2013
@@ -1130,7 +1130,7 @@ public abstract class FieldComparator<T>
           bottomSameReader = true;
           readerGen[bottomSlot] = currentReaderGen;
         } else {
-          final int index = termsIndex.lookupTerm(bottomValue, tempBR);
+          final int index = termsIndex.lookupTerm(bottomValue);
           if (index < 0) {
             bottomOrd = -index - 2;
             bottomSameReader = false;

Modified: lucene/dev/branches/lucene4547/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermAllGroupHeadsCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermAllGroupHeadsCollector.java?rev=1441181&r1=1441180&r2=1441181&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermAllGroupHeadsCollector.java
(original)
+++ lucene/dev/branches/lucene4547/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermAllGroupHeadsCollector.java
Thu Jan 31 20:32:37 2013
@@ -284,7 +284,7 @@ public abstract class TermAllGroupHeadsC
         if (collectedGroup.groupValue == null) {
           ord = -1;
         } else {
-          ord = groupIndex.lookupTerm(collectedGroup.groupValue, scratchBytesRef);
+          ord = groupIndex.lookupTerm(collectedGroup.groupValue);
         }
         if (collectedGroup.groupValue == null || ord >= 0) {
           ordSet.put(ord);
@@ -298,7 +298,7 @@ public abstract class TermAllGroupHeadsC
             if (collectedGroup.sortValues[i] == null) {
               sortOrd = -1;
             } else {
-              sortOrd = sortsIndex[i].lookupTerm(collectedGroup.sortValues[i], scratchBytesRef);
+              sortOrd = sortsIndex[i].lookupTerm(collectedGroup.sortValues[i]);
             }
             collectedGroup.sortOrds[i] = sortOrd;
           }
@@ -448,7 +448,7 @@ public abstract class TermAllGroupHeadsC
         if (collectedGroup.groupValue == null) {
           groupOrd = -1;
         } else {
-          groupOrd = groupIndex.lookupTerm(collectedGroup.groupValue, scratchBytesRef);
+          groupOrd = groupIndex.lookupTerm(collectedGroup.groupValue);
         }
         if (collectedGroup.groupValue == null || groupOrd >= 0) {
           ordSet.put(groupOrd);
@@ -459,7 +459,7 @@ public abstract class TermAllGroupHeadsC
             if (collectedGroup.sortOrds[i] == -1) {
               sortOrd = -1;
             } else {
-              sortOrd = sortsIndex[i].lookupTerm(collectedGroup.sortValues[i], scratchBytesRef);
+              sortOrd = sortsIndex[i].lookupTerm(collectedGroup.sortValues[i]);
             }
             collectedGroup.sortOrds[i] = sortOrd;
           }
@@ -588,7 +588,7 @@ public abstract class TermAllGroupHeadsC
         if (collectedGroup.groupValue == null) {
           ord = -1;
         } else {
-          ord = groupIndex.lookupTerm(collectedGroup.groupValue, scratchBytesRef);
+          ord = groupIndex.lookupTerm(collectedGroup.groupValue);
         }
         if (collectedGroup.groupValue == null || ord >= 0) {
           ordSet.put(ord);

Modified: lucene/dev/branches/lucene4547/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermAllGroupsCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermAllGroupsCollector.java?rev=1441181&r1=1441180&r2=1441181&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermAllGroupsCollector.java
(original)
+++ lucene/dev/branches/lucene4547/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermAllGroupsCollector.java
Thu Jan 31 20:32:37 2013
@@ -53,7 +53,6 @@ public class TermAllGroupsCollector exte
   private final List<BytesRef> groups;
 
   private SortedDocValues index;
-  private final BytesRef spareBytesRef = new BytesRef();
 
   /**
    * Expert: Constructs a {@link AbstractAllGroupsCollector}
@@ -113,7 +112,7 @@ public class TermAllGroupsCollector exte
       if (countedGroup == null) {
         ordSet.put(-1);
       } else {
-        int ord = index.lookupTerm(countedGroup, spareBytesRef);
+        int ord = index.lookupTerm(countedGroup);
         if (ord >= 0) {
           ordSet.put(ord);
         }

Modified: lucene/dev/branches/lucene4547/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermDistinctValuesCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermDistinctValuesCollector.java?rev=1441181&r1=1441180&r2=1441181&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermDistinctValuesCollector.java
(original)
+++ lucene/dev/branches/lucene4547/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermDistinctValuesCollector.java
Thu Jan 31 20:32:37 2013
@@ -41,7 +41,6 @@ public class TermDistinctValuesCollector
   private final List<GroupCount> groups;
   private final SentinelIntSet ordSet;
   private final GroupCount groupCounts[];
-  private final BytesRef spare = new BytesRef();
 
   private SortedDocValues groupFieldTermIndex;
   private SortedDocValues countFieldTermIndex;
@@ -109,9 +108,8 @@ public class TermDistinctValuesCollector
     groupFieldTermIndex = FieldCache.DEFAULT.getTermsIndex(context.reader(), groupField);
     countFieldTermIndex = FieldCache.DEFAULT.getTermsIndex(context.reader(), countField);
     ordSet.clear();
-    BytesRef scratch = new BytesRef();
     for (GroupCount group : groups) {
-      int groupOrd = group.groupValue == null ? -1 : groupFieldTermIndex.lookupTerm(group.groupValue,
spare);
+      int groupOrd = group.groupValue == null ? -1 : groupFieldTermIndex.lookupTerm(group.groupValue);
       if (group.groupValue != null && groupOrd < 0) {
         continue;
       }
@@ -121,7 +119,7 @@ public class TermDistinctValuesCollector
       Arrays.fill(group.ords, -2);
       int i = 0;
       for (BytesRef value : group.uniqueValues) {
-        int countOrd = value == null ? -1 : countFieldTermIndex.lookupTerm(value, scratch);
+        int countOrd = value == null ? -1 : countFieldTermIndex.lookupTerm(value);
         if (value == null || countOrd >= 0) {
           group.ords[i++] = countOrd;
         }

Modified: lucene/dev/branches/lucene4547/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermGroupFacetCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermGroupFacetCollector.java?rev=1441181&r1=1441180&r2=1441181&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermGroupFacetCollector.java
(original)
+++ lucene/dev/branches/lucene4547/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermGroupFacetCollector.java
Thu Jan 31 20:32:37 2013
@@ -40,7 +40,6 @@ public abstract class TermGroupFacetColl
 
   final List<GroupedFacetHit> groupedFacetHits;
   final SentinelIntSet segmentGroupedFacetHits;
-  final BytesRef spare = new BytesRef();
 
   SortedDocValues groupFieldTermsIndex;
 
@@ -136,12 +135,12 @@ public abstract class TermGroupFacetColl
 
       segmentGroupedFacetHits.clear();
       for (GroupedFacetHit groupedFacetHit : groupedFacetHits) {
-        int facetOrd = groupedFacetHit.facetValue == null ? -1 : facetFieldTermsIndex.lookupTerm(groupedFacetHit.facetValue,
spare);
+        int facetOrd = groupedFacetHit.facetValue == null ? -1 : facetFieldTermsIndex.lookupTerm(groupedFacetHit.facetValue);
         if (groupedFacetHit.facetValue != null && facetOrd < 0) {
           continue;
         }
 
-        int groupOrd = groupedFacetHit.groupValue == null ? -1 : groupFieldTermsIndex.lookupTerm(groupedFacetHit.groupValue,
spare);
+        int groupOrd = groupedFacetHit.groupValue == null ? -1 : groupFieldTermsIndex.lookupTerm(groupedFacetHit.groupValue);
         if (groupedFacetHit.groupValue != null && groupOrd < 0) {
           continue;
         }
@@ -151,14 +150,14 @@ public abstract class TermGroupFacetColl
       }
 
       if (facetPrefix != null) {
-        startFacetOrd = facetFieldTermsIndex.lookupTerm(facetPrefix, spare);
+        startFacetOrd = facetFieldTermsIndex.lookupTerm(facetPrefix);
         if (startFacetOrd < 0) {
           // Points to the ord one higher than facetPrefix
           startFacetOrd = -startFacetOrd - 1;
         }
         BytesRef facetEndPrefix = BytesRef.deepCopyOf(facetPrefix);
         facetEndPrefix.append(UnicodeUtil.BIG_TERM);
-        endFacetOrd = facetFieldTermsIndex.lookupTerm(facetEndPrefix, spare);
+        endFacetOrd = facetFieldTermsIndex.lookupTerm(facetEndPrefix);
         assert endFacetOrd < 0;
         endFacetOrd = -endFacetOrd - 1; // Points to the ord one higher than facetEndPrefix
       } else {
@@ -292,7 +291,7 @@ public abstract class TermGroupFacetColl
 
       segmentGroupedFacetHits.clear();
       for (GroupedFacetHit groupedFacetHit : groupedFacetHits) {
-        int groupOrd = groupedFacetHit.groupValue == null ? -1 : groupFieldTermsIndex.lookupTerm(groupedFacetHit.groupValue,
spare);
+        int groupOrd = groupedFacetHit.groupValue == null ? -1 : groupFieldTermsIndex.lookupTerm(groupedFacetHit.groupValue);
         if (groupedFacetHit.groupValue != null && groupOrd < 0) {
           continue;
         }

Modified: lucene/dev/branches/lucene4547/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermSecondPassGroupingCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermSecondPassGroupingCollector.java?rev=1441181&r1=1441180&r2=1441181&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermSecondPassGroupingCollector.java
(original)
+++ lucene/dev/branches/lucene4547/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermSecondPassGroupingCollector.java
Thu Jan 31 20:32:37 2013
@@ -40,7 +40,6 @@ public class TermSecondPassGroupingColle
 
   private final SentinelIntSet ordSet;
   private SortedDocValues index;
-  private final BytesRef spareBytesRef = new BytesRef();
   private final String groupField;
 
   @SuppressWarnings({"unchecked", "rawtypes"})
@@ -62,7 +61,7 @@ public class TermSecondPassGroupingColle
     ordSet.clear();
     for (SearchGroupDocs<BytesRef> group : groupMap.values()) {
 //      System.out.println("  group=" + (group.groupValue == null ? "null" : group.groupValue.utf8ToString()));
-      int ord = group.groupValue == null ? -1 : index.lookupTerm(group.groupValue, spareBytesRef);
+      int ord = group.groupValue == null ? -1 : index.lookupTerm(group.groupValue);
       if (group.groupValue == null || ord >= 0) {
         groupDocs[ordSet.put(ord)] = group;
       }

Modified: lucene/dev/branches/lucene4547/lucene/queries/src/java/org/apache/lucene/queries/function/docvalues/DocTermsIndexDocValues.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/lucene/queries/src/java/org/apache/lucene/queries/function/docvalues/DocTermsIndexDocValues.java?rev=1441181&r1=1441180&r2=1441181&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/lucene/queries/src/java/org/apache/lucene/queries/function/docvalues/DocTermsIndexDocValues.java
(original)
+++ lucene/dev/branches/lucene4547/lucene/queries/src/java/org/apache/lucene/queries/function/docvalues/DocTermsIndexDocValues.java
Thu Jan 31 20:32:37 2013
@@ -102,11 +102,9 @@ public abstract class DocTermsIndexDocVa
     lowerVal = lowerVal == null ? null : toTerm(lowerVal);
     upperVal = upperVal == null ? null : toTerm(upperVal);
 
-    final BytesRef spare = new BytesRef();
-
     int lower = Integer.MIN_VALUE;
     if (lowerVal != null) {
-      lower = termsIndex.lookupTerm(new BytesRef(lowerVal), spare);
+      lower = termsIndex.lookupTerm(new BytesRef(lowerVal));
       if (lower < 0) {
         lower = -lower-1;
       } else if (!includeLower) {
@@ -116,7 +114,7 @@ public abstract class DocTermsIndexDocVa
 
     int upper = Integer.MAX_VALUE;
     if (upperVal != null) {
-      upper = termsIndex.lookupTerm(new BytesRef(upperVal), spare);
+      upper = termsIndex.lookupTerm(new BytesRef(upperVal));
       if (upper < 0) {
         upper = -upper-2;
       } else if (!includeUpper) {

Modified: lucene/dev/branches/lucene4547/lucene/test-framework/src/java/org/apache/lucene/index/AssertingAtomicReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/lucene/test-framework/src/java/org/apache/lucene/index/AssertingAtomicReader.java?rev=1441181&r1=1441180&r2=1441181&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/lucene/test-framework/src/java/org/apache/lucene/index/AssertingAtomicReader.java
(original)
+++ lucene/dev/branches/lucene4547/lucene/test-framework/src/java/org/apache/lucene/index/AssertingAtomicReader.java
Thu Jan 31 20:32:37 2013
@@ -445,13 +445,11 @@ public class AssertingAtomicReader exten
     }
 
     @Override
-    public int lookupTerm(BytesRef key, BytesRef spare) {
+    public int lookupTerm(BytesRef key) {
       assert key.isValid();
-      assert spare.isValid();
-      int result = in.lookupTerm(key, spare);
+      int result = in.lookupTerm(key);
       assert result < valueCount;
       assert key.isValid();
-      assert spare.isValid();
       return result;
     }
   }

Modified: lucene/dev/branches/lucene4547/lucene/test-framework/src/java/org/apache/lucene/index/BaseDocValuesFormatTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/lucene/test-framework/src/java/org/apache/lucene/index/BaseDocValuesFormatTestCase.java?rev=1441181&r1=1441180&r2=1441181&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/lucene/test-framework/src/java/org/apache/lucene/index/BaseDocValuesFormatTestCase.java
(original)
+++ lucene/dev/branches/lucene4547/lucene/test-framework/src/java/org/apache/lucene/index/BaseDocValuesFormatTestCase.java
Thu Jan 31 20:32:37 2013
@@ -1067,7 +1067,7 @@ public abstract class BaseDocValuesForma
       hash.get(sort[i], expected);
       docValues.lookupOrd(i, actual);
       assertEquals(expected.utf8ToString(), actual.utf8ToString());
-      int ord = docValues.lookupTerm(expected, actual);
+      int ord = docValues.lookupTerm(expected);
       assertEquals(i, ord);
     }
     AtomicReader slowR = SlowCompositeReaderWrapper.wrap(reader);

Modified: lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/request/PerSegmentSingleValuedFaceting.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/request/PerSegmentSingleValuedFaceting.java?rev=1441181&r1=1441180&r2=1441181&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/request/PerSegmentSingleValuedFaceting.java
(original)
+++ lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/request/PerSegmentSingleValuedFaceting.java
Thu Jan 31 20:32:37 2013
@@ -242,11 +242,11 @@ class PerSegmentSingleValuedFaceting {
 
       if (prefix!=null) {
         BytesRef prefixRef = new BytesRef(prefix);
-        startTermIndex = si.lookupTerm(prefixRef, tempBR);
+        startTermIndex = si.lookupTerm(prefixRef);
         if (startTermIndex<0) startTermIndex=-startTermIndex-1;
         prefixRef.append(UnicodeUtil.BIG_TERM);
         // TODO: we could constrain the lower endpoint if we had a binarySearch method that
allowed passing start/end
-        endTermIndex = si.lookupTerm(prefixRef, tempBR);
+        endTermIndex = si.lookupTerm(prefixRef);
         assert endTermIndex < 0;
         endTermIndex = -endTermIndex-1;
       } else {

Modified: lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/request/SimpleFacets.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/request/SimpleFacets.java?rev=1441181&r1=1441180&r2=1441181&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/request/SimpleFacets.java
(original)
+++ lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/request/SimpleFacets.java
Thu Jan 31 20:32:37 2013
@@ -480,6 +480,8 @@ public class SimpleFacets {
 
     SortedDocValues si = FieldCache.DEFAULT.getTermsIndex(searcher.getAtomicReader(), fieldName);
 
+    final BytesRef br = new BytesRef();
+
     final BytesRef prefixRef;
     if (prefix == null) {
       prefixRef = null;
@@ -490,14 +492,12 @@ public class SimpleFacets {
       prefixRef = new BytesRef(prefix);
     }
 
-    final BytesRef br = new BytesRef();
-
     int startTermIndex, endTermIndex;
     if (prefix!=null) {
-      startTermIndex = si.lookupTerm(prefixRef, br);
+      startTermIndex = si.lookupTerm(prefixRef);
       if (startTermIndex<0) startTermIndex=-startTermIndex-1;
       prefixRef.append(UnicodeUtil.BIG_TERM);
-      endTermIndex = si.lookupTerm(prefixRef, br);
+      endTermIndex = si.lookupTerm(prefixRef);
       assert endTermIndex < 0;
       endTermIndex = -endTermIndex-1;
     } else {

Modified: lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/search/MissingStringLastComparatorSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/search/MissingStringLastComparatorSource.java?rev=1441181&r1=1441180&r2=1441181&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/search/MissingStringLastComparatorSource.java
(original)
+++ lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/search/MissingStringLastComparatorSource.java
Thu Jan 31 20:32:37 2013
@@ -203,7 +203,7 @@ class TermOrdValComparator_SML extends F
           bottomSameReader = true;
           readerGen[bottomSlot] = currentReaderGen;
         } else {
-          final int index = termsIndex.lookupTerm(bottomValue, tempBR);
+          final int index = termsIndex.lookupTerm(bottomValue);
           if (index < 0) {
             bottomOrd = -index - 2;
             bottomSameReader = false;



Mime
View raw message