[rt-users] 'content matches' and 'content doesn't match' give same results

Jeff Blaine jblaine at kickflop.net
Sun Aug 10 19:53:36 EDT 2014


[ "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."       ]
[ --Thanks for that, Joop! ]

Alex, to be clear, these queries below were done via the search
form. I am only quoting the SearchBuilder terms for simplicity.

The form stated:

    [ Content ] [ matches ] __foo.com_______

And

    [ Content ] [ doesn't match ] __foo.com_______

and I clicked search to get the same 3 tickets as results for both.

I can't see how, in some way or another, this is not a bug.

On 8/8/2014 8:38 PM, Alex Peters wrote:
> Values need to be quoted, I believe.  Compare these two queries:
> 
> Content LIKE foo.com <http://foo.com>
> Content LIKE 'foo.com <http://foo.com>'
> 
> I wonder whether wildcards might be necessary, like they seem to be in
> regular SQL:
> 
> Content LIKE '%foo.com <http://foo.com>%'
> 
> On 09/08/2014 12:36 am, "Jeff Blaine" <jblaine at kickflop.net
> <mailto:jblaine at kickflop.net>> wrote:
> 
>     Setup: RT 4.2.5 with PostgreSQL and full-text indexing enabled
>     and completed for all tickets. Tickets 1, 2, and 3 all have
>     contents with the string foo.com <http://foo.com>
> 
>     Searching for 'content LIKE foo.com <http://foo.com>' returns
>     tickets 1, 2, 3
> 
>     Searching for 'content NOT LIKE foo.com <http://foo.com>' returns
>     tickets 1, 2, 3
> 
>     Has anyone seen this? Any ideas what might be going wrong or how
>     do start debugging this?
> 
>     --
>     Jeff Blaine
>     kickflop.net <http://kickflop.net>
>     PGP/GnuPG Key ID: 0x0C8EDD02
>     --
>     RT Training - Boston, September 9-10
>     http://bestpractical.com/training
> 

-- 
Jeff Blaine
kickflop.net
PGP/GnuPG Key ID: 0x0C8EDD02



More information about the rt-users mailing list