mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 16:52:41 +01:00
Support operators in Phabricator search
Summary: Boolean search supports operators, such as phrase search. It can be further improved by setting [[http://dev.mysql.com/doc/mysql/en/server-system-variables.html#sysvar_ft_boolean_syntax | ft_boolean_syntax]] to `' |-><()~*:""&^'` (note the leading space): Default value uses no operator for "optional word" and `+` for "mandatory word". This value uses no operator for "mandatory word" and `|` for "optional word". Test Plan: Search for "Enter the name" (with quotes). Reviewers: epriestley Reviewed By: epriestley CC: aran Differential Revision: https://secure.phabricator.com/D2064
This commit is contained in:
parent
4aef876138
commit
99704ed485
1 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* Copyright 2011 Facebook, Inc.
|
||||
* Copyright 2012 Facebook, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -180,7 +180,7 @@ final class PhabricatorSearchEngineMySQL extends PhabricatorSearchEngine {
|
|||
"{$t_field} field ON field.phid = document.phid");
|
||||
$where[] = qsprintf(
|
||||
$conn_r,
|
||||
'MATCH(corpus) AGAINST (%s)',
|
||||
'MATCH(corpus) AGAINST (%s IN BOOLEAN MODE)',
|
||||
$q);
|
||||
|
||||
// When searching for a string, promote user listings above other
|
||||
|
|
Loading…
Reference in a new issue