summaryrefslogtreecommitdiffstats
path: root/store/sql_user_store.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-10-20 11:30:44 -0400
committerenahum <nahumhbl@gmail.com>2016-10-20 12:30:44 -0300
commit0a75b277dc7ebc293c3a47939bdb0e8f77e6c24f (patch)
tree4bc1dca940d4b751a10c663170520577b46742bb /store/sql_user_store.go
parent162282d42c1be601c30a5bd8f89cca548a1bf9ba (diff)
downloadchat-0a75b277dc7ebc293c3a47939bdb0e8f77e6c24f.tar.gz
chat-0a75b277dc7ebc293c3a47939bdb0e8f77e6c24f.tar.bz2
chat-0a75b277dc7ebc293c3a47939bdb0e8f77e6c24f.zip
Fix the multiple column full text search index for Postgres (#4282)
Diffstat (limited to 'store/sql_user_store.go')
-rw-r--r--store/sql_user_store.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/store/sql_user_store.go b/store/sql_user_store.go
index ca86ef115..8cee9f9d9 100644
--- a/store/sql_user_store.go
+++ b/store/sql_user_store.go
@@ -1195,6 +1195,7 @@ func (us SqlUserStore) performSearch(searchQuery string, term string, searchType
searchQuery = strings.Replace(searchQuery, "SEARCH_CLAUSE", "", 1)
} else if utils.Cfg.SqlSettings.DriverName == model.DATABASE_DRIVER_POSTGRES {
term = term + ":*"
+ searchType = convertMySQLFullTextColumnsToPostgres(searchType)
searchClause := fmt.Sprintf("AND (%s) @@ to_tsquery(:Term)", searchType)
searchQuery = strings.Replace(searchQuery, "SEARCH_CLAUSE", searchClause, 1)
} else if utils.Cfg.SqlSettings.DriverName == model.DATABASE_DRIVER_MYSQL {