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:FWED/cm:CDO/cm:CAB-DROP-FOLDER/*"')
It gives below exception A selector must be specified when there are two or more selectors
Thank you
It looks like you may be missing one argument in CONTAINS(). Did you try something like this?
select *
from cch:caseDoc as d
join cch:caseId as s
on d.cmis:objectId = s.cmis:objectId
WHERE CONTAINS(d,'PATH:"//app:company_home/cm:FDLE/cm:CCH/cm:CCH-DROP-FOLDER/*"')
(I'm just putting my comment as an answer)