AnsweredAssumed Answered

CMIS aspect query with path

Question asked by alfresco_one on Mar 17, 2017
Latest reply on Sep 7, 2018 by jpotts

Hi all,


I need to query a particular folder in the repository using a java based scheduler in alfresco.


I need to check whether the custom aspect's property is present or not. 


Below query works for me when I don't use the path query.


select * from myType:caseDoc as d join myAspect:caseId as s on d.cmis:objectId = s.cmis:objectId 


The problem with the above query is it searches all the contents in the repository but I want to target a particular folder.


When I try to put the CONTAINS in the above query it fails.

select * from cch:caseDoc as d
join cch:caseId as s on d.cmis:objectId = s.cmis:objectId WHERE CONTAINS('PATH:"//app:company_home/cm:FDLE/cm:CCH/cm:CCH-DROP-FOLDER/*"')



It gives below exception

A selector must be specified when there are two or more selectors


Thank you