Search: Add "at" as an alias for "and" #22

This commit is contained in:
Michael Mayer 2021-09-06 16:07:29 +02:00
parent d51aa86f0d
commit 6d30419b35
2 changed files with 2 additions and 0 deletions

View file

@ -17,6 +17,7 @@ func NormalizeSearchQuery(s string) string {
s = strings.ReplaceAll(s, AndEn, And) s = strings.ReplaceAll(s, AndEn, And)
s = strings.ReplaceAll(s, WithEn, And) s = strings.ReplaceAll(s, WithEn, And)
s = strings.ReplaceAll(s, InEn, And) s = strings.ReplaceAll(s, InEn, And)
s = strings.ReplaceAll(s, AtEn, And)
s = strings.ReplaceAll(s, Plus, And) s = strings.ReplaceAll(s, Plus, And)
s = strings.ReplaceAll(s, "%", "*") s = strings.ReplaceAll(s, "%", "*")
return strings.Trim(s, "+&|_-=!@$%^(){}\\<>,.;: ") return strings.Trim(s, "+&|_-=!@$%^(){}\\<>,.;: ")

View file

@ -49,6 +49,7 @@ const (
AndEn = " and " AndEn = " and "
WithEn = " with " WithEn = " with "
InEn = " in " InEn = " in "
AtEn = " at "
Space = " " Space = " "
Empty = "" Empty = ""
) )