From 32078865147dc4779023e036aba164842067e58b Mon Sep 17 00:00:00 2001 From: Corey Hulen Date: Mon, 17 Apr 2017 07:54:26 -0700 Subject: Adding the ability to disable full text search queries for master (#6102) --- model/search_params.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'model/search_params.go') diff --git a/model/search_params.go b/model/search_params.go index 802ec1be8..070ac6d24 100644 --- a/model/search_params.go +++ b/model/search_params.go @@ -4,6 +4,7 @@ package model import ( + "encoding/json" "regexp" "strings" ) @@ -19,6 +20,15 @@ type SearchParams struct { OrTerms bool } +func (o *SearchParams) ToJson() string { + b, err := json.Marshal(o) + if err != nil { + return "" + } else { + return string(b) + } +} + var searchFlags = [...]string{"from", "channel", "in"} func splitWordsNoQuotes(text string) []string { -- cgit v1.2.3-1-g7c22