You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ro...@apache.org on 2013/10/29 20:24:34 UTC
svn commit: r1536858 - in /lucene/dev/trunk/lucene: CHANGES.txt
analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/StemmerOverrideFilter.java
Author: romseygeek
Date: Tue Oct 29 19:24:33 2013
New Revision: 1536858
URL: http://svn.apache.org/r1536858
Log:
LUCENE-5302: Make StemmerOverrideMap's methods public
Modified:
lucene/dev/trunk/lucene/CHANGES.txt
lucene/dev/trunk/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/StemmerOverrideFilter.java
Modified: lucene/dev/trunk/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/CHANGES.txt?rev=1536858&r1=1536857&r2=1536858&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/CHANGES.txt (original)
+++ lucene/dev/trunk/lucene/CHANGES.txt Tue Oct 29 19:24:33 2013
@@ -126,6 +126,8 @@ New Features
* LUCENE-2844: The benchmark module can now test the spatial module. See
spatial.alg (David Smiley, Liviy Ambrose)
+* LUCENE-5302: Make StemmerOverrideMap's methods public (Alan Woodward)
+
Bug Fixes
* LUCENE-4998: Fixed a few places to pass IOContext.READONCE instead
Modified: lucene/dev/trunk/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/StemmerOverrideFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/StemmerOverrideFilter.java?rev=1536858&r1=1536857&r2=1536858&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/StemmerOverrideFilter.java (original)
+++ lucene/dev/trunk/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/StemmerOverrideFilter.java Tue Oct 29 19:24:33 2013
@@ -17,9 +17,6 @@ package org.apache.lucene.analysis.misce
* limitations under the License.
*/
-import java.io.IOException;
-import java.util.ArrayList;
-
import org.apache.lucene.analysis.TokenFilter;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
@@ -34,6 +31,9 @@ import org.apache.lucene.util.fst.FST;
import org.apache.lucene.util.fst.FST.Arc;
import org.apache.lucene.util.fst.FST.BytesReader;
+import java.io.IOException;
+import java.util.ArrayList;
+
/**
* Provides the ability to override any {@link KeywordAttribute} aware stemmer
* with custom dictionary-based stemming.
@@ -100,15 +100,15 @@ public final class StemmerOverrideFilter
* @param fst the fst to lookup the overrides
* @param ignoreCase if the keys case should be ingored
*/
- StemmerOverrideMap(FST<BytesRef> fst, boolean ignoreCase) {
+ public StemmerOverrideMap(FST<BytesRef> fst, boolean ignoreCase) {
this.fst = fst;
this.ignoreCase = ignoreCase;
}
/**
- * Returns a {@link BytesReader} to pass to the {@link #get(char[], int, Arc, BytesReader)} method.
+ * Returns a {@link BytesReader} to pass to the {@link #get(char[], int, FST.Arc, FST.BytesReader)} method.
*/
- BytesReader getBytesReader() {
+ public BytesReader getBytesReader() {
if (fst == null) {
return null;
} else {
@@ -119,7 +119,7 @@ public final class StemmerOverrideFilter
/**
* Returns the value mapped to the given key or <code>null</code> if the key is not in the FST dictionary.
*/
- BytesRef get(char[] buffer, int bufferLen, Arc<BytesRef> scratchArc, BytesReader fstReader) throws IOException {
+ public BytesRef get(char[] buffer, int bufferLen, Arc<BytesRef> scratchArc, BytesReader fstReader) throws IOException {
BytesRef pendingOutput = fst.outputs.getNoOutput();
BytesRef matchOutput = null;
int bufUpto = 0;