jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: How to handle the colon character within fulltext search?
Date Fri, 25 Jun 2010 10:17:05 GMT
On Fri, Jun 25, 2010 at 11:42, Gary Long <long@magillem.com> 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
alexander.klimetschek@day.com

Mime
View raw message