11-10-2016 02:36 PM
How can I perform the search of all documents, from a respective site eg 'sispat', and bring the paths of all the documents?
I made a query that returns the paths of all folders:
SELECT * FROM cmis: folder WHERE CONTAINS ( 'PATH: \ "/ app: company_home / st: sites / cm: sispat / cm: documentLibrary // * / * / * \"')
But I wanted one that made the relationship between folder and document, for example:
Name document | path
Document-x.pdf | /sites/sispat/documentlibary/folder1/document-x.pdf
como eu posso realizar a busca de todos os documentos, de um respectivo site por exemplo 'sispat', e trazer os paths de todos os documentos?
Eu fiz uma consulta que retorna os paths de todas as pastas:
SELECT * FROM cmis:folder WHERE CONTAINS('PATH:\"/app:company_home/st:sites/cm:sispat/cm:documentLibrary//*/*/*\"')
Mas eu queria uma que fizesse a relação entre pasta e documento, trazendo por exemplo:
name document | Path
document-x.pdf | /sites/sispat/documentlibary/folder1/document-x.pdf
11-10-2016 10:49 PM
Why not just use getDescendant or getFolderTree method of Folder class and iterate folder tree assemble path you self.
11-14-2016 01:08 PM
I do not think you understood my doubt. I need to perform all this search in a query and this query should return the document name linked to the path of the same document
11-14-2016 01:09 PM
I do not think you understood my doubt.
I need to perform all this search in a query and this query should return the
document name linked to the path of the same document.
Example:
Name Document | PATH
Paper.doc |/sites/sispat/documentLibary/folder/Paper.doc
11-15-2016 03:23 AM
I don´t think that this is working with such a document based query because only folders have a path property. Joining documents and folders would help, but I don´t know if Alfresco is supporting joins in the meantime (https://community.alfresco.com/docs/DOC-5898-cmis-query-language#w_cmis3adocument -The Alfresco implementation currently does not support JOIN except as an extension to support aspects. This extension is Alfresco specific.)
11-11-2016 06:02 PM
Why not selecting all documents with the IN_TREE clause?
Example: SELECT cmis:name FROM cmis:document WHERE IN_TREE(‘folder id’)
I hope this helps.
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.