HomePhabricator
Diffusion Comm 35b7721bd5aa

[kayserver] Fix search endpoint failing when called with a stopword

Description

[kayserver] Fix search endpoint failing when called with a stopword

Summary:
issue: https://linear.app/comm/issue/ENG-4055/search-endpoint-failing-when-called-with-only-a-stopword
When searchMessagesInSingleChat was passed a string with only stopwords, they were stripped away by processQueryForSearch and the pattern variable was '+', which is not a valid patter for MATCH AGAINST query

Test Plan: call the endpoint with a string that had only stopwords, checked that there are no errors. Called the endpoint with a string containing both a stopword and a non stopword, checked that it returns correct values. Checked he endpoint with a string containing only a non stopword.

Reviewers: kamil, bartek

Reviewed By: kamil, bartek

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D8144

Details

Provenance
InkaSokolowskaAuthored on Jun 7 2023, 6:41 AM
Reviewer
kamil
Differential Revision
D8144: [kayserver] Fix search endpoint failing when called with a stopword
Parents
rCOMMac297e5134ca: [keyserver] Validate search endpoint response
Branches
Unknown
Tags
Unknown