diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-11-24 09:35:09 -0500 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2016-11-24 09:35:09 -0500 |
commit | 981ea33b8e10456bc279f36235c814305d01b243 (patch) | |
tree | 00fb6119d9ef16f60d4c0dbdaad1bd6dfbc347ed /store/sql_user_store.go | |
parent | c96ecae6da31aceabf29586cde872876b81d11d9 (diff) | |
download | chat-981ea33b8e10456bc279f36235c814305d01b243.tar.gz chat-981ea33b8e10456bc279f36235c814305d01b243.tar.bz2 chat-981ea33b8e10456bc279f36235c814305d01b243.zip |
PLT-4403 Add server-based channel autocomplete, search and paging (#4585)
* Add more channel paging API
* Add channel paging support to client
* Add DB channel search functions
* Add API for searching more channels
* Add more channel search functionality to client
* Add API for autocompleting channels
* Add channel autocomplete functionality to the client
* Move to be deprecated APIs to their own file
* Final clean-up
* Fixes related to feedback
* Localization changes
* Add unit as suffix to timeout constants
Diffstat (limited to 'store/sql_user_store.go')
-rw-r--r-- | store/sql_user_store.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/store/sql_user_store.go b/store/sql_user_store.go index 1a38e89e8..b09b479a9 100644 --- a/store/sql_user_store.go +++ b/store/sql_user_store.go @@ -1120,7 +1120,7 @@ func (us SqlUserStore) Search(teamId string, term string, options map[string]boo SEARCH_CLAUSE INACTIVE_CLAUSE ORDER BY Username ASC - LIMIT 50` + LIMIT 100` } else { searchQuery = ` SELECT @@ -1264,7 +1264,7 @@ func (us SqlUserStore) performSearch(searchQuery string, term string, options ma term = strings.Join(splitTerm, " ") searchType = convertMySQLFullTextColumnsToPostgres(searchType) - searchClause := fmt.Sprintf("AND (%s) @@ to_tsquery(:Term)", searchType) + searchClause := fmt.Sprintf("AND (%s) @@ to_tsquery('simple', :Term)", searchType) searchQuery = strings.Replace(searchQuery, "SEARCH_CLAUSE", searchClause, 1) } else if utils.Cfg.SqlSettings.DriverName == model.DATABASE_DRIVER_MYSQL { splitTerm := strings.Fields(term) |