FYI,
I just noticed that if you type the word "NOT" into the search and hit return a database error is dumped i.e.
Database operation "select" failed (exception NSDB, "Query was not a statement returning rows.")
ERROR: no operand
SQL: select o.object_id
from txt, acs_objects o
where fti @@ to_tsquery('default','!')
and o.object_id = txt.object_id
and exists (select 1
from acs_object_party_privilege_map m
where m.object_id = txt.object_id
and m.party_id = '144049'
and m.privilege = 'read')
order by rank(fti,to_tsquery('default','!')) desc
limit 10 offset 0
while executing
"ns_pg_bind select nsdb0 {select o.object_id
from txt, acs_objects o
where fti @@ to_tsquery('default',:query)