Update AdvancedSearchQueryTerm.php
Applied Amy's fix for "is not" for exact match with double quotation
This commit is contained in:
parent
6b75e99407
commit
e698a7c6c7
1 changed files with 2 additions and 3 deletions
|
|
@ -295,14 +295,13 @@ class AdvancedSearchQueryTerm {
|
||||||
|
|
||||||
// Case 1: if keyword contains one word or a phrase
|
// Case 1: if keyword contains one word or a phrase
|
||||||
if(strpos(trim($value), ' ') !== false) {
|
if(strpos(trim($value), ' ') !== false) {
|
||||||
// phrase
|
|
||||||
// add Or for the search case "scarborough bulletin" show no results
|
// add Or for the search case "scarborough bulletin" show no results
|
||||||
|
$isNot = $this->getInclude() ? "" : "!";
|
||||||
if (substr_count($value, '\"') == 2) {
|
if (substr_count($value, '\"') == 2) {
|
||||||
$value = str_replace('\"', "", trim($value));
|
$value = str_replace('\"', "", trim($value));
|
||||||
return $value;
|
return $isNot . $value;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$isNot = $this->getInclude() ? "" : "!";
|
|
||||||
return $isNot . "(" .$value . " OR " . str_replace('"', "", trim($value)) . ")";
|
return $isNot . "(" .$value . " OR " . str_replace('"', "", trim($value)) . ")";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue