ACS- DB query to get the UUIDs of all documents belonging to a particular site?

cancel
Showing results for 
Search instead for 
Did you mean: 
paiyyavj13
Established Member II

ACS- DB query to get the UUIDs of all documents belonging to a particular site?

Jump to solution

Hi,

I am trying to get all the UUID of the documents in a particular ACS site- All documents in the site are of a custom doctype(lets say: customDocType)-

I am using the below db query:
SELECT
nodes.UUID
FROM
alf_node nodes, alf_qname names
WHERE
nodes.type_qname_id=names.id 
AND names.local_name='customDocType';

This gives me a list of UUIDs across the repository-

Could any one let me know whether there is an additional query condition I could add to the above db query which would give me only the UUIDs of documents within a particular ACS site.

Thank You...

Regards.

1 Solution

Accepted Solutions
afaust
Master

Re: ACS- DB query to get the UUIDs of all documents belonging to a particular site?

Jump to solution

Querying documents for a specific site via the database is not possible using a simple query condition. You would need to create a stored procedure / function that is able to recursively iterate over the folder/file structure (via alf_child_assoc table) to do the actual query.

This is one of the main reasons that Alfresco cannot / does not support SITE or ANCESTOR queries as transactional metadata queries (TMQ) using Alfresco FTS.

View solution in original post

2 Replies
afaust
Master

Re: ACS- DB query to get the UUIDs of all documents belonging to a particular site?

Jump to solution

Querying documents for a specific site via the database is not possible using a simple query condition. You would need to create a stored procedure / function that is able to recursively iterate over the folder/file structure (via alf_child_assoc table) to do the actual query.

This is one of the main reasons that Alfresco cannot / does not support SITE or ANCESTOR queries as transactional metadata queries (TMQ) using Alfresco FTS.

paiyyavj13
Established Member II

Re: ACS- DB query to get the UUIDs of all documents belonging to a particular site?

Jump to solution

Thank you Axel...

So getting what I need from the DB queries is unlikely...

I am going to opt the JavaScript API to get what i need through a custom script-

siteDocLibNode.childFileFolders(files, folders, ignoreTypes, skipOffset, maxItems, requestTotalCountMax, sortProp, sortAsc, queryExecutionId);

Good day...

Regards.