03-17-2017 10:33 AM
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.cmisbjectId = s.cmis
bjectId
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.cmisbjectId = s.cmis
bjectId WHERE CONTAINS('PATH:"//app:company_home/cm:FDLE/cm:CCH/cm:CCH-DROP-FOLDER/*"')
It gives below exception
Thank you
09-07-2018 04:09 PM
Old post, but the problem here is explained by the exception: the selector is missing.
The fix is to add it. Change:
WHERE CONTAINS('PATH:"//app:company_home/cm:FDLE/cm:CCH/cm:CCH-DROP-FOLDER/*"')
to:
WHERE CONTAINS(d, 'PATH:"//app:company_home/cm:FDLE/cm:CCH/cm:CCH-DROP-FOLDER/*"')
Explore our Alfresco products with the links below. Use labels to filter content by product module.