You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CommonGramsFilterFactory's use of the "words" and "ignoreCase" config options is inconsistent with how StopFilterFactory uses them - leading to "ignoreCase=true" not being respected unless "words" is specified.
Reproduce:
[Test]publicvoidtestIgnoreCase(){IResourceLoaderloader=new ClasspathResourceLoader(typeof(TestAnalyzers));CommonGramsFilterFactoryfactory=(CommonGramsFilterFactory)
TokenFilterFactory("CommonGrams", TEST_VERSION_CURRENT, loader,"ignoreCase","true");CharArraySetwords= factory.CommonWords;
assertTrue("words is null and it shouldn't be",words!=null);
assertTrue(words.contains("the"));//passes
assertTrue(words.contains("The"));//failsTokenizertokenizer=new MockTokenizer(new StringReader("testing the factory"),MockTokenizer.WHITESPACE,false);TokenStreamstream= factory.Create(tokenizer);
AssertTokenStreamContents(
stream,new String[]{"testing","testing_The","The","The_factory","factory"});}
Working for a PR now.
The text was updated successfully, but these errors were encountered:
See Lucene-10008. It's also valid for lucene.
CommonGramsFilterFactory's use of the "words" and "ignoreCase" config options is inconsistent with how StopFilterFactory uses them - leading to "ignoreCase=true" not being respected unless "words" is specified.
Reproduce:
Working for a PR now.
The text was updated successfully, but these errors were encountered: