Index: openacs-4/packages/tsearch2-driver/tcl/tsearch2-driver-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/tsearch2-driver/tcl/tsearch2-driver-procs.tcl,v diff -u -N -r1.41.2.2 -r1.41.2.3 --- openacs-4/packages/tsearch2-driver/tcl/tsearch2-driver-procs.tcl 21 Aug 2019 06:47:07 -0000 1.41.2.2 +++ openacs-4/packages/tsearch2-driver/tcl/tsearch2-driver-procs.tcl 4 Feb 2020 08:52:53 -0000 1.41.2.3 @@ -275,9 +275,12 @@ # remove "not" at end of query regsub -nocase " not$" $query {} query + # remove "not" alone + regsub -nocase "^not$" $query {} query + # replace boolean words with boolean operators regsub -nocase "^not " $query {!} query - set query [string map {" and " " & " " or " " | " " not " " ! "} " $query "] + set query [string map {" and " " & " " or " " | " " not " " ! "} $query] # remove leading and trailing spaces so they aren't turned into & set query [string trim $query]