Skip to content

Commit

Permalink
Add LUCENENET-specific backport comment
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirwin committed Oct 28, 2024
1 parent e603350 commit 9ee498d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ public virtual void Inform(IResourceLoader loader)
}
else
{
commonWords = new CharArraySet(m_luceneMatchVersion,StopAnalyzer.ENGLISH_STOP_WORDS_SET, ignoreCase);
// LUCENENET-specific: backported ignoreCase fix from Lucene 8.10.0 (lucene#188, LUCENE-10008)
commonWords = new CharArraySet(m_luceneMatchVersion, StopAnalyzer.ENGLISH_STOP_WORDS_SET, ignoreCase);
}
}

Expand All @@ -85,4 +86,4 @@ public override TokenStream Create(TokenStream input)
return commonGrams;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public virtual void TestDefaults()
AssertTokenStreamContents(stream, new string[] { "testing", "testing_the", "the", "the_factory", "factory" });
}

// LUCENENET-specific: backported ignoreCase fix from Lucene 8.10.0 (lucene#188, LUCENE-10008)
[Test]
public void TestIgnoreCase()
{
Expand All @@ -93,8 +94,9 @@ public void TestIgnoreCase()
Tokenizer tokenizer = new MockTokenizer(new StringReader("testing The factory"),MockTokenizer.WHITESPACE, false);
TokenStream stream = factory.Create(tokenizer);
AssertTokenStreamContents(
stream, new String[] {"testing", "testing_The", "The", "The_factory", "factory"});
stream, new string[] {"testing", "testing_The", "The", "The_factory", "factory"});
}

/// <summary>
/// Test that bogus arguments result in exception </summary>
[Test]
Expand All @@ -111,4 +113,4 @@ public virtual void TestBogusArguments()
}
}
}
}
}

0 comments on commit 9ee498d

Please sign in to comment.