PLT-7207: Change from fulltext to LIKE search for user filtering (#7343)

* PLT-7202: Switch user search to LIKE queries to avoid fulltext pitfalls.

* Add 2 char name unit test.

* Escape underscores properly.

* Add more tests and fix * handling.

* Make search/indexes case insensitive for postgres.
Этот коммит содержится в:
George Goldberg
2017-09-27 18:44:22 +01:00
коммит произвёл GitHub
родитель 8c80cdde38
Коммит 8d662105d3
3 изменённых файлов: 119 добавлений и 62 удалений

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

@@ -1583,7 +1583,7 @@ func (s SqlChannelStore) performSearch(searchQuery string, term string, paramete
result := store.StoreResult{}
// these chars have special meaning and can be treated as spaces
for _, c := range specialUserSearchChar {
for _, c := range ignoreUserSearchChar {
term = strings.Replace(term, c, " ", -1)
}