jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@adobe.com>
Subject Re: jcr:contains query issues
Date Tue, 05 Jun 2012 18:57:40 GMT
On 28.03.2012, at 05:46, Torgeir Veimo wrote:

> I'm trying to query (using xpath xyntax) for a number of nodes with
> sorting based on how many tags on each node matches a set of tags.
> I'm currently trying to do this using
> //element(*, nt:base)[jcr:contains(@tagproperty, 'tag1 tag2 tag3')]
> order by @jcr:score
> but it doesn't work very well.

If you use a multi-value property, you can do:

//*[@tagproperty = "tag1" or @tagproperty = "tag2" or @tagproperty = "tag3"]

For multi-value properties, the operator "=" matches if at least one value matches.

I think the first terms get a higher score. Not sure how to handle your dummy match score


View raw message