mirror of
https://github.com/Jackett/Jackett
synced 2025-02-23 14:51:01 +00:00
TorrentSyndikat: Do not filter query, remove wildcard operator. (#5489)
TS removes too short terms automatically. Wildcard causes problems with not indexed terms such as "how" (as in "how to sell drugs online fast").
This commit is contained in:
parent
919bf4d99a
commit
756161f1e7
1 changed files with 1 additions and 3 deletions
|
@ -151,9 +151,7 @@ namespace Jackett.Common.Indexers
|
|||
{
|
||||
// use AND+wildcard operator to avoid getting to many useless results
|
||||
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 => !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
|
||||
var searchStringFinal = String.Join(" ", searchStringArray);
|
||||
queryCollection.Add("search", searchStringFinal);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue