Ignore "@" sign at the beginning of user searches (#9780)

This trims the "@" symbol from the begging of the search term before executing the query.
Этот коммит содержится в:
Daniel Fiori
2018-11-12 15:54:12 -05:00
коммит произвёл Christopher Speller
родитель 7a758eae72
Коммит fa0aecce1e
2 изменённых файлов: 11 добавлений и 1 удалений

Просмотреть файл

@@ -1166,7 +1166,7 @@ func generateSearchQuery(searchQuery string, terms []string, fields []string, pa
}
}
searchTerms = append(searchTerms, fmt.Sprintf("(%s)", strings.Join(searchFields, " OR ")))
parameters[fmt.Sprintf("Term%d", i)] = fmt.Sprintf("%s%%", term)
parameters[fmt.Sprintf("Term%d", i)] = fmt.Sprintf("%s%%", strings.TrimLeft(term, "@"))
}
searchClause := strings.Join(searchTerms, " AND ")