public void TestGetHints() { WordsHintBuilder.Words.Add("ABCD"); WordsHintBuilder.Words.Add("Abcdef"); WordsHintBuilder.BuildIndexByBatch(Config, true, true, true, null, true); CollectionAssert.AreEquivalent(new[] { "ABCD" }, LucenePool.GetHints(Config.LuceneIndexForHint, "ABC", 10, true)); CollectionAssert.AreEquivalent(new[] { "ABCD", "Abcdef" }, LucenePool.GetHints(Config.LuceneIndexForHint, "ABC", 10, false)); }
public static string[] GetHints(string luceneIndex, string word, int maxResults = 20, bool caseSensitive = false) { return(LucenePool.GetHints(luceneIndex, word, maxResults, caseSensitive)); }