<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 9-8-2014 11:57, Joop wrote:<br>
</div>
<blockquote cite="mid:53E5F0A4.8030905@xs4all.nl" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<br>
I ran a search with StatementLogging enabled and this is the sql
statement with "content not like 'foo.com'" and "content like
'foo.com'", they are the same.<br>
<br>
SELECT COUNT(DISTINCT main.id) FROM Tickets main JOIN Transactions
Transactions_1 ON ( Transactions_1.ObjectType = 'RT::Ticket' )
AND ( Transactions_1.ObjectId = main.id ) JOIN Attachments
Attachments_2 ON ( Attachments_2.TransactionId =
Transactions_1.id ) WHERE (main.IsMerged IS NULL) AND
(main.Status != 'deleted') AND (main.Type = 'ticket') AND ( (
Attachments_2.ContentIndex @@ plainto_tsquery('foo.com') ) ) ;<br>
<br>
Seems the last AND should really be a AND NOT.<br>
<br>
In the past SearchBuilder always pre and postpended % around
search terms. Not sure if it still does but I think so.<br>
<br>
Joop<br>
</blockquote>
This was on rt-4.0.21 and rt-4.2.26, Searchbuilder-1.59 and 1.65
respectively<br>
<br>
Joop<br>
<br>
</body>
</html>