From 93945d35ab1874c5047b312e91a4d54bc3e5e944 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Rodi=C3=A8re?= Date: Wed, 15 Apr 2020 16:43:41 +0200 Subject: [PATCH] HSEARCH-3892 Remove unused methods from TextMultiValues --- .../docvalues/impl/TextMultiValues.java | 39 ------------------- 1 file changed, 39 deletions(-) diff --git a/backend/lucene/src/main/java/org/hibernate/search/backend/lucene/lowlevel/docvalues/impl/TextMultiValues.java b/backend/lucene/src/main/java/org/hibernate/search/backend/lucene/lowlevel/docvalues/impl/TextMultiValues.java index f6016cd3fd8..97a9d6db971 100644 --- a/backend/lucene/src/main/java/org/hibernate/search/backend/lucene/lowlevel/docvalues/impl/TextMultiValues.java +++ b/backend/lucene/src/main/java/org/hibernate/search/backend/lucene/lowlevel/docvalues/impl/TextMultiValues.java @@ -9,7 +9,6 @@ import java.io.IOException; import org.apache.lucene.index.SortedSetDocValues; -import org.apache.lucene.util.BytesRef; /** * A per-document, unordered sequence of text ordinals. @@ -49,16 +48,6 @@ protected TextMultiValues() { */ public abstract long nextOrd() throws IOException; - - /** Retrieves the value for the specified ordinal. The returned - * {@link BytesRef} may be re-used across calls to lookupOrd so make sure to - * {@link BytesRef#deepCopyOf(BytesRef) copy it} if you want to keep it - * around. - * @param ord ordinal to lookup - * @see #nextOrd - */ - public abstract BytesRef lookupOrd(long ord) throws IOException; - /** * Returns the number of unique values. * @return number of unique values in this SortedDocValues. This is @@ -66,14 +55,6 @@ protected TextMultiValues() { */ public abstract long getValueCount(); - /** If {@code key} exists, returns its ordinal, else - * returns {@code -insertionPoint-1}, like {@code - * Arrays.binarySearch}. - * - * @param key Key to look up - **/ - public abstract long lookupTerm(BytesRef key) throws IOException; - public static TextMultiValues fromDocValues(SortedSetDocValues docValues) { return new DocValuesTextMultiValues( docValues ); } @@ -98,20 +79,10 @@ public long nextOrd() { throw new UnsupportedOperationException(); } - @Override - public BytesRef lookupOrd(long ord) throws IOException { - throw new IllegalArgumentException( "Ord " + ord + " is too large" ); - } - @Override public long getValueCount() { return 0; } - - @Override - public long lookupTerm(BytesRef key) throws IOException { - return -1; - } }; protected static class DocValuesTextMultiValues extends TextMultiValues { @@ -142,19 +113,9 @@ public long nextOrd() throws IOException { return result; } - @Override - public BytesRef lookupOrd(long ord) throws IOException { - return values.lookupOrd( ord ); - } - @Override public long getValueCount() { return values.getValueCount(); } - - @Override - public long lookupTerm(BytesRef key) throws IOException { - return values.lookupTerm( key ); - } } }