Commit 35ba29c4cb5ac22386f8545281a796615edf7954
1 parent
486c9d1f
Merged in from DEV trunk...
KTS-3329 "Boolean expression break simple search" Fixed Committed By: Conrad Vermeulen Reviewed By: Megan Watson git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/branches/3.5.2c-Release-Branch@8441 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
6 additions
and
0 deletions
search2/search/expr.inc.php
| ... | ... | @@ -557,6 +557,12 @@ class ValueExpr extends Expr |
| 557 | 557 | public function __construct($value, $fuzzy=null, $proximity=null) |
| 558 | 558 | { |
| 559 | 559 | parent::__construct(); |
| 560 | + | |
| 561 | + // some keywords are used by lucene, and may conflict. for some reason, if it is lowercase, the problem does not occur. | |
| 562 | + if (in_array($value, array('AND','OR','NOT'))) | |
| 563 | + { | |
| 564 | + $value = strtolower($value); | |
| 565 | + } | |
| 560 | 566 | $this->value=$value; |
| 561 | 567 | $this->fuzzy = $fuzzy; |
| 562 | 568 | $this->proximity = $proximity; | ... | ... |