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.
Solved! Go 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.
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.
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.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.