jackrabbit-users mailing list archives

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

Alexander Klimetschek wrote:
> Run your jcr xpath/sql query that selects your desired nodes and then
> call QueryResult.getNodes().getSize() to get the number of results.
> The query for your case would probably be something like this:
> SELECT * FROM my:nodetype WHERE tag='foo'
> Not quite - i do not know all possible values for the tag property and i
> went to know how many time each distinct value is used.
Worst case I guess i should be able to do SELECT tag FROM my:ntype WHERE tag
IS NOT NULL and do the counting myself; just wanted to see if there was
anything else I could do.

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

View raw message