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

This commit is contained in:
Michael Mayer 2021-09-06 15:59:38 +02:00
parent 4a6b0baacf
commit d51aa86f0d
2 changed files with 2 additions and 0 deletions

View file

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

View file

@ -48,6 +48,7 @@ const (
OrEn = " or "
AndEn = " and "
WithEn = " with "
InEn = " in "
Space = " "
Empty = ""
)