This commit is contained in:
@@ -568,6 +568,7 @@ namespace AyaNova.Biz
|
||||
//Get stopwords and CJKIndex flag value
|
||||
LocaleWordBreakingData LocaleSearchData = GetLocaleSearchData(localeId);
|
||||
int MAXWORDLENGTH = 255;
|
||||
int MINWORDLENGTH = 2;//A word isn't a word unless it's got at least two characters in it
|
||||
StringBuilder sbResults = new StringBuilder();
|
||||
//List to temporarily hold parsed words
|
||||
//used to easily ensure unique words only
|
||||
@@ -824,10 +825,15 @@ namespace AyaNova.Biz
|
||||
//from the word list
|
||||
foreach (string s in tempParsedWords)
|
||||
{
|
||||
//Add only non stopwords
|
||||
if (!LocaleSearchData.StopWords.Contains(s))
|
||||
//Filter out short words if we are breaking for indexing
|
||||
//but keep them if they are part of a wildcard search phrase
|
||||
if (s.Length > MINWORDLENGTH || (KeepWildCards && s.Contains('%')))
|
||||
{
|
||||
ReturnList.Add(s);
|
||||
//Add only non stopwords
|
||||
if (!LocaleSearchData.StopWords.Contains(s))
|
||||
{
|
||||
ReturnList.Add(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user