jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From KÖLL Claus <C.KO...@TIROL.GV.AT>
Subject AW: Search Question
Date Wed, 28 Mar 2007 13:50:08 GMT
hi marcel,
thanks lot for the info !


-----Ursprüngliche Nachricht-----
Von: Marcel Reutegger [mailto:marcel.reutegger@gmx.net] 
Gesendet: Mittwoch, 28. März 2007 15:30
An: users@jackrabbit.apache.org
Betreff: Re: Search Question

Hi Claus,

KÖLL Claus wrote:
> i have added a text file to my workspace and it contains the word "car"  
> with the sql search
> SELECT * FROM nt:base WHERE contains(*, 'car') 
> a node will be found
> the node path is /test.txt/jcr:content
> But if i try to combine the full text search with a single property to limit
> the search result it does not work
> SELECT * FROM nt:base WHERE contains(*, 'car') and my:createuser = 'admin'
> The node structure looks like
> /test.txt (nt:file)
>  -my:createuser (Mixin)
>  - .. some properties
>  /jcr:content (nt:resource)
>    -jcr:mimetype
>    -jcr:lastModified
>    -jcr:data
>    -....
> Is it possible to limit a full text search ?

the property my:createuser is on a different node than the fulltext match.

the following query will work:

//element(*, nt:file)[jcr:contains(jcr:content, 'car') and my:createuser = 'admin']

unfortunately there's no equivalent in SQL because SQL cannot distinguish node 
and property names.

SELECT * FROM nt:file WHERE contains(jcr:content, 'car') and my:createuser = 'admin'

in the above query the jcr:content is interpreted as a property name.


View raw message