fix test case after maxGramSize of EdgeNGram changed

This commit is contained in:
YeonghyeonKO 2024-09-20 21:24:55 +09:00
parent 3b442bd383
commit 1a0329bb80
1 changed files with 3 additions and 3 deletions

View File

@ -90,12 +90,12 @@ public class TestNGramFilters extends BaseTokenStreamFactoryTestCase {
stream.close();
}
/** Test EdgeNGramTokenizerFactory */
/** Test EdgeNGramTokenizerFactory with default (after commit '3b442bd3834') */
public void testEdgeNGramTokenizer() throws Exception {
Reader reader = new StringReader("test");
TokenStream stream = tokenizerFactory("EdgeNGram").create();
((Tokenizer) stream).setReader(reader);
assertTokenStreamContents(stream, new String[] {"t"});
assertTokenStreamContents(stream, new String[] {"t", "te"});
}
/** Test EdgeNGramTokenizerFactory with min and max gram size */
@ -107,7 +107,7 @@ public class TestNGramFilters extends BaseTokenStreamFactoryTestCase {
assertTokenStreamContents(stream, new String[] {"t", "te"});
}
/** Test EdgeNGramFilterFactory with old defaults */
/** Test EdgeNGramFilterFactory with old defaults (before commit '3b442bd3834') */
public void testEdgeNGramFilter() throws Exception {
Reader reader = new StringReader("test");
TokenStream stream = whitespaceMockTokenizer(reader);