jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@adobe.com>
Subject Re: XPath Question
Date Mon, 07 Feb 2011 08:06:48 GMT
On 06.02.11 19:39, "Alexander Saar" <alexander.saar@googlemail.com> wrote:
>thanks for the reply. If sub levels do not work then why is this query
>/jcr:root//element(*, nt:unstructured)[jcr:contains(./*/*/@text, 'test')]
>order by @jcr:score

You can only have fixed relative paths inside the jcr:contains, such as
"jcr:content/foo/@text", and probably that includes wildcards. But you
can't use any Xpath axis here, i.e. not "//".

>When I try index aggregates it seems that I cannot search for specific
>properties anymore. At least jcr:contains(@property, 'test') is not
>returning any results but jcr:contains(., 'test') does. Is this expected
>to the aggregation?

I don't know exactly, but I think if you define an index-rule, you need to
explicitly name all properties or use a wildcard matcher:

<property isRegexp="true">.*:.*</property>

But not sure if the same holds true for aggregates.


Alexander Klimetschek
Developer // Adobe (Day) // Berlin - Basel

View raw message