Skip to content

Commit

Permalink
Add assert that fails one Elasticsearch upgrades to Lucene 4.3 in ord…
Browse files Browse the repository at this point in the history
…er to remove the duplicated class
  • Loading branch information
s1monw committed Apr 26, 2013
1 parent 90353ce commit 2ed2fab
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -30,10 +30,12 @@
import org.apache.lucene.util.CharsRef;
import org.apache.lucene.util.IntsRef;
import org.apache.lucene.util.UnicodeUtil;
import org.apache.lucene.util.Version;
import org.apache.lucene.util.fst.ByteSequenceOutputs;
import org.apache.lucene.util.fst.FST;
import org.apache.lucene.util.fst.FST.Arc;
import org.apache.lucene.util.fst.FST.BytesReader;
import org.elasticsearch.common.lucene.Lucene;

/**
* Provides the ability to override any {@link KeywordAttribute} aware stemmer
Expand All @@ -47,10 +49,13 @@ public final class XStemmerOverrideFilter extends TokenFilter {
private final KeywordAttribute keywordAtt = addAttribute(KeywordAttribute.class);
private final BytesReader fstReader;
private final Arc<BytesRef> scratchArc = new FST.Arc<BytesRef>();
;
private final CharsRef spare = new CharsRef();
private final boolean ignoreCase;

static {
assert Version.LUCENE_42 == Lucene.VERSION: "Elasticsearch has upgraded to Lucene Version: [" + Lucene.VERSION + "] this should can be removed";
}

/**
* Create a new StemmerOverrideFilter, performing dictionary-based stemming
* with the provided <code>dictionary</code>.
Expand Down

0 comments on commit 2ed2fab

Please sign in to comment.