How to find total number of document uploaded in repository?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2010 08:32 AM
Hi,
Is there any way i can get total number of content documents uploaded in Alfresco repository by all existing users.
I found one db query but it does not seem to give correct ouptut.
where 35 is id for content in alfresco.alf_qname table.
I want total number of documents uploaded either via 'Add Content' in Alfresco explorer or using WebDav or any other mechanism.
I think i am missing something. :!:
Any web script or java script or service api or any db query will do?
Would appreciate for any help!
Is there any way i can get total number of content documents uploaded in Alfresco repository by all existing users.
I found one db query but it does not seem to give correct ouptut.
SELECT count(*) FROM alfresco.alf_node a where type_qname_id=35;
where 35 is id for content in alfresco.alf_qname table.
I want total number of documents uploaded either via 'Add Content' in Alfresco explorer or using WebDav or any other mechanism.
I think i am missing something. :!:
Any web script or java script or service api or any db query will do?
Would appreciate for any help!
Labels:
- Labels:
-
Archive
7 REPLIES 7

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-29-2010 10:08 AM
Best way is the one you have tried. You might get incorrect results because of deleted content. So limit your query to workspace
pacesStore e.g. AND store_id=<id>.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2010 07:07 AM
Hi Ivan,
Thanks for your help.
Below is updated query to get all content for "workspace:spacestore" :
Thanks for your help.
Below is updated query to get all content for "workspace:spacestore" :
SELECT count(*) FROM alfresco.alf_node a where type_qname_id=35 and store_id=6;

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2010 12:28 AM
Hi,
I used a webscript to get total number of content in repository as DB thingy was not accurate all the times. :?:
Here is the code for same:
To get it rendered , i used model array variable in ftl:
I used a webscript to get total number of content in repository as DB thingy was not accurate all the times. :?:
Here is the code for same:
var contentDocs = search.luceneSearch("TYPE:\"{http://www.alfresco.org/model/content/1.0}content\"");
var totalCnt = contentDocs.length;
To get it rendered , i used model array variable in ftl:
model.allContent = totalCnt ;


Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2010 10:56 AM
Didn't you run in the 1000 limit with the webscript?
I have over 100,000 documents, but unless I change system.acl.maxPermissionChecks and system.acl.maxPermissionCheckTimeMillis to higher numbers, there is apparently no way.
I read another post where, in java, one could use a fetchSize() method to split the resultSet, but I don't know how to do it in javascript.. If anyone has insights.
Anyways, for a repository that gets really large, it may just take too long to return. I have also written a database stored procedure to get the total number of documents, by types.
I have over 100,000 documents, but unless I change system.acl.maxPermissionChecks and system.acl.maxPermissionCheckTimeMillis to higher numbers, there is apparently no way.
I read another post where, in java, one could use a fetchSize() method to split the resultSet, but I don't know how to do it in javascript.. If anyone has insights.
Anyways, for a repository that gets really large, it may just take too long to return. I have also written a database stored procedure to get the total number of documents, by types.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2010 06:11 AM
Hi all,
I'm trying to do quite the same thing, but I have to retrieve the number of content's uploaded per user.
The direct db query seems interesting, but where could you do that? You have to write your java code and access directly to the db, or you can use some kind of Alfresco API that support sql queries?
I'm trying to do quite the same thing, but I have to retrieve the number of content's uploaded per user.
The direct db query seems interesting, but where could you do that? You have to write your java code and access directly to the db, or you can use some kind of Alfresco API that support sql queries?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2010 06:12 AM
You can write a webscript which, instead of using a javascript, uses a traditional java class (java backed web script)

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2010 06:14 AM
I have posted a couple things in my blog
http://ironman.darthgibus.net/?cat=23
But I haven't written the webscript yet.
http://ironman.darthgibus.net/?cat=23
But I haven't written the webscript yet.
