jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "gary long" <gary.l...@gmx.fr>
Subject Re : Re: problem with SQL query and full text search
Date Fri, 19 Mar 2010 08:48:47 GMT
----- Message d'origine -----
De : Alexander Klimetschek
Envoyés : 18.03.10 18:37
À : users@jackrabbit.apache.org
Objet : Re: problem with SQL query and full text search

On Thu, Mar 18, 2010 at 18:12, gary long <gary.long@gmx.fr> wrote:
> Hi Hi :)
> I try to write a query that searches for a text in the properties of a certain type of
node in my repository. I thought it could be possible to write something like :
> SELECT * FROM mnt:resource WHERE contains((jcr:name, jcr:content), "my text");
> But it doesn't work :(
> So, is there a mean to specify multiple columns in a contains() or is it possible to
write multiple contains in a single SQL request?

The latter, afaik (guessing you use JCR 1.0 jcr-sql):

SELECT * FROM mnt:resource WHERE contains(jcr:name, "my text") AND
contains(jcr:content, "my text")

See also http://www.day.com/specs/jcr/1.0/


Alexander Klimetschek
 Ok, so it's possible to write multiple contains() statements. Thank you for your help :)

My SQL request is now : 

SELECT * FROM mnt:resource WHERE contains("jcr:text", "some text") " +
 "OR contains("jcr:name", "some text");

And looks like it works ;)


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message