jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ard Schrijvers" <a.schrijv...@hippo.nl>
Subject RE: 'any property'-Support for XPath-Query (@*)
Date Tue, 28 Aug 2007 15:44:48 GMT
> Markus Fritz wrote: 
> I already have tried
> 
>      //users/*/*/*/masterdata[jcr:contains(.,'Mich')]
>      //users/*/*/*/masterdata[jcr:contains(.,'Mich%')]
>      //users/*/*/*/masterdata[jcr:like(.,'Mich%')]
>      //users/*/*/*/masterdata[jcr:like(@*,'Mich%')]
> 
> but nothing helps, no results ...

*/*/masterdata[jcr:like(@*,'Mich%')]

AFAIU,  

1) //users/*/*/*/masterdata[jcr:contains(.,'Mich')]

is searching in _FULLTEXT (lucene field) for 'Mich' which is not a term. so no hit

2) //users/*/*/*/masterdata[jcr:contains(.,'Mich%')]

should be  //users/*/*/*/masterdata[jcr:contains(.,'Mich*')] to match

3) //users/*/*/*/masterdata[jcr:like(.,'Mich%')] 

a jcr:like is not supported on node scope level, but make only sense on a property

4) //users/*/*/*/masterdata[jcr:like(@*,'Mich%')]

First of all, I am not sure wether @* is working (anybody? I did some tests, but does not
seem to give me correct results, though does not return errors). 

Secondly, do realize, that the property should start with 'Mich' in order to match. If it
would start with 'Mister Michael' for example, in property 'author' your query should be:

//users/*/*/*/masterdata[jcr:like(@author,'%Mich%')] to match. Be aware that % prefixing can
become very slow (for many nodes or long texts)

Anyway, should the @* work?

Regards Ard

> 
> 
> Thanks,
>      Markus
> 
> -- 
> Dipl.-Ing. (FH) Markus Fritz             markus.fritz.nospam@justis.de
> Just Innovative Software GmbH * Robert-Bosch-Str. 32 * 74081 Heilbronn
> Tel.: +49 (0)71 31 89 87 8-0             Fax: +49 (0)71 31) 89 87 8-79
> ----------------------------------------------------------------------
> Registergericht: Amtsgericht Stuttgart, HRB 108601
> 
> Geschaeftsfuehrer:
> Monika Buchmann
> 

Mime
View raw message