You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by cp...@apache.org on 2016/12/22 10:07:15 UTC

[1/2] lucene-solr:master: Remove unused private ValueHolder class in TestGrouping.

Repository: lucene-solr
Updated Branches:
  refs/heads/master 393e36e1c -> b73314998


Remove unused private ValueHolder class in TestGrouping.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/3366724f
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/3366724f
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/3366724f

Branch: refs/heads/master
Commit: 3366724fa0c4dfdecf568dd99c4aa8e98a9b1330
Parents: 393e36e
Author: Christine Poerschke <cp...@apache.org>
Authored: Thu Dec 22 09:35:46 2016 +0000
Committer: Christine Poerschke <cp...@apache.org>
Committed: Thu Dec 22 09:35:46 2016 +0000

----------------------------------------------------------------------
 .../org/apache/lucene/search/grouping/TestGrouping.java     | 9 ---------
 1 file changed, 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3366724f/lucene/grouping/src/test/org/apache/lucene/search/grouping/TestGrouping.java
----------------------------------------------------------------------
diff --git a/lucene/grouping/src/test/org/apache/lucene/search/grouping/TestGrouping.java b/lucene/grouping/src/test/org/apache/lucene/search/grouping/TestGrouping.java
index 6e2422c..72c858f 100644
--- a/lucene/grouping/src/test/org/apache/lucene/search/grouping/TestGrouping.java
+++ b/lucene/grouping/src/test/org/apache/lucene/search/grouping/TestGrouping.java
@@ -1327,13 +1327,4 @@ public class TestGrouping extends LuceneTestCase {
       return "ShardSearcher(" + ctx.get(0).reader() + ")";
     }
   }
-
-  private static class ValueHolder<V> {
-
-    V value;
-
-    private ValueHolder(V value) {
-      this.value = value;
-    }
-  }
 }


[2/2] lucene-solr:master: Remove unused private AnalyzingComparator class from FreeTextSuggester.

Posted by cp...@apache.org.
Remove unused private AnalyzingComparator class from FreeTextSuggester.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/b7331499
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/b7331499
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/b7331499

Branch: refs/heads/master
Commit: b73314998ebf2cd67e9c952413c13804b049e267
Parents: 3366724
Author: Christine Poerschke <cp...@apache.org>
Authored: Thu Dec 22 09:37:09 2016 +0000
Committer: Christine Poerschke <cp...@apache.org>
Committed: Thu Dec 22 09:37:09 2016 +0000

----------------------------------------------------------------------
 .../suggest/analyzing/FreeTextSuggester.java    | 45 --------------------
 1 file changed, 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b7331499/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/FreeTextSuggester.java
----------------------------------------------------------------------
diff --git a/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/FreeTextSuggester.java b/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/FreeTextSuggester.java
index cc4ed4b..3e4845b 100644
--- a/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/FreeTextSuggester.java
+++ b/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/FreeTextSuggester.java
@@ -54,7 +54,6 @@ import org.apache.lucene.index.Terms;
 import org.apache.lucene.index.TermsEnum;
 import org.apache.lucene.search.suggest.InputIterator;
 import org.apache.lucene.search.suggest.Lookup;
-import org.apache.lucene.store.ByteArrayDataInput;
 import org.apache.lucene.store.DataInput;
 import org.apache.lucene.store.DataOutput;
 import org.apache.lucene.store.Directory;
@@ -221,50 +220,6 @@ public class FreeTextSuggester extends Lookup implements Accountable {
     }
   }
 
-  private static class AnalyzingComparator implements Comparator<BytesRef> {
-
-    private final ByteArrayDataInput readerA = new ByteArrayDataInput();
-    private final ByteArrayDataInput readerB = new ByteArrayDataInput();
-    private final BytesRef scratchA = new BytesRef();
-    private final BytesRef scratchB = new BytesRef();
-
-    @Override
-    public int compare(BytesRef a, BytesRef b) {
-      readerA.reset(a.bytes, a.offset, a.length);
-      readerB.reset(b.bytes, b.offset, b.length);
-
-      // By token:
-      scratchA.length = readerA.readShort();
-      scratchA.bytes = a.bytes;
-      scratchA.offset = readerA.getPosition();
-
-      scratchB.bytes = b.bytes;
-      scratchB.length = readerB.readShort();
-      scratchB.offset = readerB.getPosition();
-
-      int cmp = scratchA.compareTo(scratchB);
-      if (cmp != 0) {
-        return cmp;
-      }
-      readerA.skipBytes(scratchA.length);
-      readerB.skipBytes(scratchB.length);
-
-      // By length (smaller surface forms sorted first):
-      cmp = a.length - b.length;
-      if (cmp != 0) {
-        return cmp;
-      }
-
-      // By surface form:
-      scratchA.offset = readerA.getPosition();
-      scratchA.length = a.length - scratchA.offset;
-      scratchB.offset = readerB.getPosition();
-      scratchB.length = b.length - scratchB.offset;
-
-      return scratchA.compareTo(scratchB);
-    }
-  }
-
   private Analyzer addShingles(final Analyzer other) {
     if (grams == 1) {
       return other;