mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-24 14:30:56 +01:00
Switch normal query from match to simple_query_string
Summary: It's like query_string but fails a little nicer on bad input. It also allows for limited Lucene syntax; notably exact string matches with quotation marks. Fixes T6780 Test Plan: Tested multiple query constructions, including exact string matching. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley Maniphest Tasks: T6780 Differential Revision: https://secure.phabricator.com/D11011
This commit is contained in:
parent
bdda61184b
commit
c953c0fedc
1 changed files with 3 additions and 5 deletions
|
@ -99,11 +99,9 @@ final class PhabricatorSearchEngineElastic extends PhabricatorSearchEngine {
|
|||
|
||||
if (strlen($query->getParameter('query'))) {
|
||||
$spec[] = array(
|
||||
'match' => array(
|
||||
'field.corpus' => array(
|
||||
'operator' => 'and',
|
||||
'query' => $query->getParameter('query'),
|
||||
),
|
||||
'simple_query_string' => array(
|
||||
'query' => $query->getParameter('query'),
|
||||
'fields' => array( 'field.corpus' ),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue