jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gregoryjoseph <gregory.jos...@magnolia-cms.com>
Subject Counting occurences of a given property's different values
Date Thu, 05 Feb 2009 14:46:56 GMT

Hi list,

Here's what I'd like to do, in semi-sql form:
SELECT count(*), prop_value FROM nodes WHERE prop_name='foo' GROUP BY
(or something in that vein, i'd have to refresh my sql 'skills')

The use case is simply a tag cloud. I have content nodes with one property
'tag', which is a multi-value. I want to know how many time each distinct
value if used over all (or a set of) nodes.

JCR-260 tells me that count() isn't implemented in xpath, and I assume it
isn't in jcr-sql either. Is there any alternative, or something obvious that
I don't see ? It'd be acceptable for me to use jackrabbit extensions (i.e a
custom function maybe)

Cheers and thanks for any tip,


View this message in context: http://www.nabble.com/Counting-occurences-of-a-given-property%27s-different-values-tp21852761p21852761.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

View raw message