Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 53264 invoked from network); 5 Feb 2009 15:29:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Feb 2009 15:29:17 -0000 Received: (qmail 27859 invoked by uid 500); 5 Feb 2009 15:29:12 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 27847 invoked by uid 500); 5 Feb 2009 15:29:12 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 27825 invoked by uid 99); 5 Feb 2009 15:29:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Feb 2009 07:29:12 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Feb 2009 15:29:04 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1LV69j-00054t-Ip for users@jackrabbit.apache.org; Thu, 05 Feb 2009 07:28:43 -0800 Message-ID: <21853614.post@talk.nabble.com> Date: Thu, 5 Feb 2009 07:28:43 -0800 (PST) From: gregoryjoseph To: users@jackrabbit.apache.org Subject: Re: Counting occurences of a given property's different values In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: gregory.joseph@magnolia-cms.com References: <21852761.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org 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.