我试图解决的用例是:
在 /apps 下查找所有组件的所有页面引用。
即首先找到正在使用某个组件的所有页面,然后对/apps 下的所有组件执行此操作。
通过使用 Adobe AEM 的报告生成器工具:https ://adobe-consulting-services.github.io/acs-aem-commons/features/report-builder/configuring.html
查询我正在尝试:
SELECT * FROM [nt:base] AS s
WHERE [sling:resourceType] IN (SELECT path FROM [cq:Component] AS s WHERE [componentGroup] IS NOT NULL AND ISDESCENDANTNODE([/apps]))
AND ISDESCENDANTNODE([/content])
背景:
我只需要从内部查询中清理结果集。如果没有清理,它会吐出表单的路径/apps/acs-commons/components/utilities/report-builder/columns/text
,
而来自外部查询的sling:resourceType只能接受acs-commons/components/utilities/report-builder/columns/text
。所以我需要/apps/
从内部查询结果集路径中剥离出来。
这是错误消息:
Caused by: java.text.ParseException: Query: SELECT * FROM [nt:base] AS s
WHERE [sling:resourceType] IN (SELECT(*)CAST(path, AS STRING) FROM [cq:Component] AS s WHERE [componentGroup] IS NOT NULL AND ISDESCENDANTNODE([/apps]))
AND ISDESCENDANTNODE([/content]); expected: static operand