Torrent Syndikat: remove articles from search

This commit is contained in:
kaso17 2016-12-29 12:15:17 +01:00
parent 171205bdee
commit 40dde036d6
1 changed files with 1 additions and 0 deletions

View File

@ -132,6 +132,7 @@ namespace Jackett.Indexers
// use AND+wildcard operator to avoid getting to many useless results // use AND+wildcard operator to avoid getting to many useless results
var searchStringArray = Regex.Split(searchString.Trim(), "[ _.-]+", RegexOptions.Compiled).ToList(); var searchStringArray = Regex.Split(searchString.Trim(), "[ _.-]+", RegexOptions.Compiled).ToList();
searchStringArray = searchStringArray.Where(x => x.Length >= 3).ToList(); // remove words with less than 3 characters searchStringArray = searchStringArray.Where(x => x.Length >= 3).ToList(); // remove words with less than 3 characters
searchStringArray = searchStringArray.Where(x => !new string[] { "der", "die", "das", "the" }.Contains(x.ToLower())).ToList(); // remove words with less than 3 characters
searchStringArray = searchStringArray.Select(x => "+" + x + "*").ToList(); // add AND operators+wildcards searchStringArray = searchStringArray.Select(x => "+" + x + "*").ToList(); // add AND operators+wildcards
var searchStringFinal = String.Join(" ", searchStringArray); var searchStringFinal = String.Join(" ", searchStringArray);
queryCollection.Add("search", searchStringFinal); queryCollection.Add("search", searchStringFinal);