diff --git a/src/applications/search/engine/PhabricatorSearchEngineElastic.php b/src/applications/search/engine/PhabricatorSearchEngineElastic.php index 95b973ad28..120460a6c0 100644 --- a/src/applications/search/engine/PhabricatorSearchEngineElastic.php +++ b/src/applications/search/engine/PhabricatorSearchEngineElastic.php @@ -222,7 +222,8 @@ final class PhabricatorSearchEngineElastic extends PhabricatorSearchEngine { throw $ex; } $query = clone $query; - $query->setQuery( + $query->setParameter( + 'query', addcslashes( $query->getParameter('query'), '+-&|!(){}[]^"~*?:\\')); $response = $this->executeRequest($uri, $this->buildSpec($query));