diff options
author | Joram Wilander <jwawilander@gmail.com> | 2018-06-29 18:13:13 -0400 |
---|---|---|
committer | Jesús Espino <jespinog@gmail.com> | 2018-06-30 00:13:13 +0200 |
commit | 2362a5b7f7c2b4bf2b35b104e8616d847b33b0be (patch) | |
tree | baba1dba36f06308524e56c82df2ff7264cba50b /store/sqlstore/channel_store.go | |
parent | 4245797cb23b3f9dc99ff556a5ee22c4e14140bc (diff) | |
download | chat-2362a5b7f7c2b4bf2b35b104e8616d847b33b0be.tar.gz chat-2362a5b7f7c2b4bf2b35b104e8616d847b33b0be.tar.bz2 chat-2362a5b7f7c2b4bf2b35b104e8616d847b33b0be.zip |
Ignore | characters in postgres channel search (#9019)
Diffstat (limited to 'store/sqlstore/channel_store.go')
-rw-r--r-- | store/sqlstore/channel_store.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/store/sqlstore/channel_store.go b/store/sqlstore/channel_store.go index e062d41d1..f82a00858 100644 --- a/store/sqlstore/channel_store.go +++ b/store/sqlstore/channel_store.go @@ -1617,6 +1617,8 @@ func (s SqlChannelStore) buildFulltextClause(term string) (fulltextClause, fullt // Prepare the FULLTEXT portion of the query. if s.DriverName() == model.DATABASE_DRIVER_POSTGRES { + fulltextTerm = strings.Replace(fulltextTerm, "|", "", -1) + splitTerm := strings.Fields(fulltextTerm) for i, t := range strings.Fields(fulltextTerm) { if i == len(splitTerm)-1 { |