cancel
Showing results for 
Search instead for 
Did you mean: 

CMIS query to query the documents/folders under data dictionary

udayakumar_p
Confirmed Champ
Confirmed Champ

We are trying to fetch the list of folders from Data Dictionary. However the CMIS query does not work. Following are the queries we tried.

select * from cmis:folder where CONTAINS('PATH:"//app:company_home/cmSmiley Very Happyata Dictionary/*"')

select * from cmis:folder where CONTAINS('PATH:"//app:company_home/Data Dictionary/*"')

Can anyone suggest the right query to use

1 ACCEPTED ANSWER

kalpesh_c2
Star Collaborator
Star Collaborator

Hi,

This will fetch you all the children of data dictionary folder.

SELECT * FROM cmis:folder WHERE CONTAINS('PATH:"//app:company_home/app:dictionary/*"')

Thanks,

Kalpesh

ContCentric

View answer in original post

5 REPLIES 5

kalpesh_c2
Star Collaborator
Star Collaborator

Hi,

This will fetch you all the children of data dictionary folder.

SELECT * FROM cmis:folder WHERE CONTAINS('PATH:"//app:company_home/app:dictionary/*"')

Thanks,

Kalpesh

ContCentric

Thanks

franciscoduarte
Champ in-the-making
Champ in-the-making

Hi,

Is there a way to get the folders inside too?

Sample query with nested folders:

SELECT * FROM cmis:folder WHERE CONTAINS('PATH:"//app:company_home/app:dictionary//*"')

Some other approach described by @afaust in https://hub.alfresco.com/t5/alfresco-content-services-forum/get-all-childs-of-a-node/td-p/76864 (using FTS instead of CMIS syntax)

ANCESTOR:"workspace://SpacesStore/b9f46070-fd06-4a72-8389-e3c76ca574a1" AND TYPE:"cm:folder"
Hyland Developer Evangelist

I made a mistake, I wanted to say documents too and not folders. The title mentions folders/documents but the solution provides only folders.