Search: Add "with" as an alias for "and" #22
This commit is contained in:
parent
ed89552631
commit
4a6b0baacf
2 changed files with 2 additions and 0 deletions
|
@ -15,6 +15,7 @@ func NormalizeSearchQuery(s string) string {
|
|||
s = strings.ToLower(txt.Clip(s, txt.ClipQuery))
|
||||
s = strings.ReplaceAll(s, OrEn, Or)
|
||||
s = strings.ReplaceAll(s, AndEn, And)
|
||||
s = strings.ReplaceAll(s, WithEn, And)
|
||||
s = strings.ReplaceAll(s, Plus, And)
|
||||
s = strings.ReplaceAll(s, "%", "*")
|
||||
return strings.Trim(s, "+&|_-=!@$%^(){}\\<>,.;: ")
|
||||
|
|
|
@ -47,6 +47,7 @@ const (
|
|||
Plus = " + "
|
||||
OrEn = " or "
|
||||
AndEn = " and "
|
||||
WithEn = " with "
|
||||
Space = " "
|
||||
Empty = ""
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue