diff --git a/search/query/match.go b/search/query/match.go index f320bfa96..2129124f7 100644 --- a/search/query/match.go +++ b/search/query/match.go @@ -137,7 +137,7 @@ func (q *MatchQuery) Searcher(ctx context.Context, i index.IndexReader, m mappin tokens, err := analysis.AnalyzeForTokens(analyzer, []byte(q.Match)) if err != nil { - fmt.Printf("(*MatchQuery) Searcher: analysis err:%+v\n", err) + return nil, fmt.Errorf("error analyzing input: %v", err) } if len(tokens) > 0 { diff --git a/search/query/match_phrase.go b/search/query/match_phrase.go index 45208868d..813bf6bd8 100644 --- a/search/query/match_phrase.go +++ b/search/query/match_phrase.go @@ -86,7 +86,7 @@ func (q *MatchPhraseQuery) Searcher(ctx context.Context, i index.IndexReader, m tokens, err := analysis.AnalyzeForTokens(analyzer, []byte(q.MatchPhrase)) if err != nil { - fmt.Printf("(*MatchQuery) Searcher: analysis err:%+v\n", err) + return nil, fmt.Errorf("error analyzing input: %v", err) } if len(tokens) > 0 { phrase := tokenStreamToPhrase(tokens)