Apache Lucene open-source search software
Remove unused private AnalyzingComparator class from FreeTextSuggester.
Christine Poerschkeb73314998ebf
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.javaindex cc4ed4b00bb..3e4845bf16b 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;