12-27-2016 01:13 PM
Hi,
I need a SQL query to list all folder and file names with their size .
Can we do it using alfresco database or using opencmis workbench
Thanks
12-27-2016 03:09 PM
12-27-2016 04:12 PM
Thanks for such valuable info
If i take database approach :
Can you pls tell which table contains the names of the sites in the database?
If i use apache cmis workbench:
How do i set the max hit to unlimited in the sql query editor....it shows only 100 results for a sql query
12-28-2016 10:21 AM
12-28-2016 11:22 AM
I have read on alfresco documentation that this can be achieved using rest api
But i don't know how to use it in alfresco.
If there is a tutorial available or sample code available, please give me the link.
Thanks
12-28-2016 10:56 AM
You can try to search solr index directly,It could have better performance.
01-06-2017 02:39 AM
Please refer this link where Morgan explains some useful DB queries. You may modify those as per your requirement.
09-07-2017 05:45 AM
Hi
This aggregation can be done using the public search API in 5.2.1 and later.
This is most likely over kill :-), but you can get the stats for all content that matches any query.
This will only include content you are allowed to see.
{
"query": {
"query": "name:*"
},
"stats": [
{
"field": "content.size",
"label": "myStat",
"min": true,
"max": true,
"stddev": true,
"missing": true,
"sum": true,
"count": true,
"sumOfSquares": true,
"percentiles": ["1","12.5","25","50","75","99"],
"distinctValues": true,
"countDistinct": true,
"cardinality": true,
"cardinalityAccuracy": 0.1
}
]
}
You can nest stats in other breakdowns - for example by site ....
{
"query": {
"query": "name:*"
},
"facetFields": {
"facets": [
{"field": "SITE", "label": "site"}
]
},
"stats": [
{
"field": "content.size",
"label": "size",
"min": true,
"max": true,
"stddev": true,
"missing": true,
"sum": true,
"countValues": true,
"sumOfSquares": true,
"percentiles": ["1","12.5","25","50","75","99"],
"distinctValues": false,
"countDistinct": true,
"cardinality": true,
"cardinalityAccuracy": 0.1
}
],
"ranges":[
{
"field": "created",
"start": "NOW/YEAR-5YEARS",
"end": "NOW/YEAR+1YEAR",
"gap": "+1YEAR",
"label": "created"
}],
"pivots" : [
{
"key": "site",
"pivots": [
{
"key": "size"
}
]
}
]
}
I need to get back to my blogging backlog!
Andy
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.