From dade9773070c6d63b5d19351903c2d106154d1a7 Mon Sep 17 00:00:00 2001 From: epriestley Date: Sun, 3 May 2020 09:32:13 -0700 Subject: [PATCH] Provide a hint about how to quote search terms containing literal colons Summary: See . Provide a more direct path forward if users hit the "unknown function" error but are trying to search for a term with a colon in it. Test Plan: {F7414068} {F7414067} Differential Revision: https://secure.phabricator.com/D21209 --- src/applications/search/ferret/PhabricatorFerretEngine.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/applications/search/ferret/PhabricatorFerretEngine.php b/src/applications/search/ferret/PhabricatorFerretEngine.php index 3f36893b40..252223548a 100644 --- a/src/applications/search/ferret/PhabricatorFerretEngine.php +++ b/src/applications/search/ferret/PhabricatorFerretEngine.php @@ -34,7 +34,9 @@ abstract class PhabricatorFerretEngine extends Phobject { if (!isset($this->ferretFunctions[$normalized_name])) { throw new PhutilSearchQueryCompilerSyntaxException( pht( - 'Unknown search function "%s". Supported functions are: %s.', + 'Unknown search function "%s". Supported functions are: %s. '. + '(To search for a term containing a colon, surround the term '. + 'in double quotes.)', $raw_name, implode(', ', array_keys($this->ferretFunctions)))); }