02-07-2019 04:32 PM
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.
02-08-2019 05:01 AM
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.
02-08-2019 05:01 AM
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.
02-08-2019 01:19 PM
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.
Explore our Alfresco products with the links below. Use labels to filter content by product module.