You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Bénigot Yves <yv...@ginerativ.fr> on 2011/09/15 14:52:32 UTC
Q : how to make repository content statistics
We use jackrabbit 2.0 inside a web application to store documents
How can we program statistics such as :
- the total number of documents
- compute the number of documents per property values for a given property
- compute a two dimensional table of the number of documents per property
values for a given property couple
?
The properties would be dynamically selected by the user at runtime among a list of defined properties
Scanning the entire repository is possible but obviously slow.
Is there a better way to do this through the API, or to extend JackRabbit to do just this ?
Yves
Re: Q : how to make repository content statistics
Posted by Lukas Kahwe Smith <ml...@pooteeweet.org>.
On Sep 26, 2011, at 13:16 , khenissi wrote:
> Ok, thanks; qr.getRows().getSize() return the total number of documents
> But, how to get a multiple result sorted with properties criteria, like the
> groupeBy SQL clause
i assume you mean "facetting"?
this is currently not yet support. i know that its support inside HippoCMS's jackrabbit fork.
i am hoping that now that Lucene which is used by Jackrabbit for search, has native support for facetting that someone will contribute it in during the work for the upcoming 2.3 version.
regards,
Lukas Kahwe Smith
mls@pooteeweet.org
Re: Q : how to make repository content statistics
Posted by khenissi <wk...@aheadit.com.tn>.
Ok, thanks; qr.getRows().getSize() return the total number of documents
But, how to get a multiple result sorted with properties criteria, like the
groupeBy SQL clause
--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Q-how-to-make-repository-content-statistics-tp3815458p3843417.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
Re: Q : how to make repository content statistics
Posted by Mark Herman <MH...@NBME.org>.
Bénigot Yves wrote:
>
> How can we program statistics such as :
> - the total number of documents
> - compute the number of documents per property values for a given property
> - compute a two dimensional table of the number of documents per property
> values for a given property couple
> ?
>
Here is a start:
QueryManager qm = session.getWorkspace().getQueryManager();
Query q = qm.createQuery("SELECT * FROM [nt:file] WHERE LOCALNAME() LIKE
'%.txt' and [\"jcr:createdBy\"] = 'anonymous'", Query.JCR_SQL2);
QueryResult qr = q.execute();
long stat = qr.getRows().getSize();
Considering you're using 2.0, be wary of [0]
[0] https://issues.apache.org/jira/browse/JCR-2765
--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Q-how-to-make-repository-content-statistics-tp3815458p3815803.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.