On Fri, Jun 25, 2010 at 11:42, Gary Long <[email protected]> wrote:
> Hello there :)
>
> I'm using the fulltext search feature of Jackrabbit and i'm facing a little
> problem with the colon character (:). For example, if I search for a mail
> which subject is "Tr : Tr : your response", I can't find it. If I search for
> "your response" the e-mail is found.
>
> my sql query is :
>
> SELECT * FROM mnt:resource WHERE (contains(jcr:text, '*tr: tr: your
> response*') OR contains(jcr:name, '*tr: tr: your response*');

You should escape the query for the contains/jcr:contains function
using the Text.escapeIllegalXpathSearchChars helper from
jackrabbit-jcr-commons:
http://wiki.apache.org/jackrabbit/EncodingAndEscaping#Escaping_values_in_queries

Regards,
Alex

-- 
Alexander Klimetschek
[email protected]

Reply via email to