You must specify the required Version compatibility when creating SpanishAnalyzer:
public virtual void TestExclude() { CharArraySet exclusionSet = new CharArraySet(TEST_VERSION_CURRENT, AsSet("chicano"), false); Analyzer a = new SpanishAnalyzer(TEST_VERSION_CURRENT, SpanishAnalyzer.DefaultStopSet, exclusionSet); CheckOneTerm(a, "chicana", "chican"); CheckOneTerm(a, "chicano", "chicano"); }
public virtual void TestBasics() { Analyzer a = new SpanishAnalyzer(TEST_VERSION_CURRENT); // stemming CheckOneTerm(a, "chicana", "chican"); CheckOneTerm(a, "chicano", "chican"); // stopword AssertAnalyzesTo(a, "los", new string[] { }); }