cancel
Showing results for 
Search instead for 
Did you mean: 

How to count documents in each sites

janaka1984
Star Contributor
Star Contributor

Hi,

i have used  search.luceneSearch("TYPE:\"cm:content\" AND PATH:\"//app:company_home/st:sites//*\" "); . but it returned total documents of sites.

i need to  filter documents count  per each sites and  also need to filter it according to dates.

please give me hints

Regards

janaka

1 ACCEPTED ANSWER
8 REPLIES 8

angelborroy
Community Manager Community Manager
Community Manager

You can try with http://localhost:8080/alfresco/s/api/solrstats/site/{site-id} but it does not allow to filter according dates

Hyland Developer Evangelist

douglascrp
World-Class Innovator
World-Class Innovator

Angel Borroy​ I didn't know this webservice.

It seems to be really useful.

Thank you for sharing it.

kaynezhang
World-Class Innovator
World-Class Innovator

I don't think you will get what you need just by query statements

Webscript api/solrstats/ can only collect statistics under a site( by the way this webscript allow to filter according startDate and endDate parameter).

I think you need do some custom development using solr-fts-alfresco language and SolrStatsService.

hi,

i used following url.  but it does only return documents in repository (out side of folder). how can read all documents in all site's document library at once?

AlfConstants.PROXY_URI +"slingshot/doclib/doclist/documents/node/alfresco/company/home";

Best Regards

Janaka

it does return as follow.  but i couldn't see any details of document. this url is same as i provided in upper comment

{

  "totalRecords": 13,

  "startIndex": 0,

  "metadata":

  {

  "repositoryId": "b6170285-f0d5-4c43-a9df-74ea45d06696",

  "container": "workspace://SpacesStore/c7070144-e864-4443-bf25-3179d6385886",

  "parent":

  {

  "nodeRef": "workspace://SpacesStore/c7070144-e864-4443-bf25-3179d6385886",

  "permissions":

  {

  "userAccess":

  {

  "create": true,

  "edit": true,

  "delete": true,

  "cancel-checkout": false,

  "permissions": true

  }

  }

  },

  "onlineEditing": false,

  "itemCounts":

  {

  "folders": 0,

  "documents": 0

  }

  },

  "items":

  [

  ]

}

thanks

Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.