0

我正在尝试对 6.2 Adob​​e AEM 版本的 CRX 执行查询。

我必须在(aNode 是 /content/connect/it/supplier/ 的通用子节点)上执行全文查询:

1) /content/connect/it/supplier/aNode/jcr:content 的所有属性

2)/content/connect/it/supplier/aNode/jcr:content/service/legal的所有子节点

如您所见,在 JCR OAK 的以下图片中以红色突出显示:

在此处输入图像描述

为了实现我的目标,我使用 AEM 查询构建器调试器使用了以下查询:

path:/content/connect/it/supplier
orderBy:@jcr:score
p.limit:-1

group.p.or:true
group.1_fulltext:*something to search*
group.1_fulltext.relPath:jcr:content
group.2_fulltext:*something to search*
group.2_fulltext.relPath:jcr:content/service/legal

在 jcr:content 的属性上搜索“要搜索的内容”可以正常工作

我无法搜索“jcr:content/service/legal”的子节点。它不检索任何东西。

4

3 回答 3

0
fulltext=something to search
group.p.or=true
group.1_path=/content/connect/it/supplier

这会自动搜索 jcr:content 中的全文及其下方的子节点。这将满足您在 jcr:content 属性和 jcr:content 子节点中搜索的目的

如果要搜索多个路径的全文

fulltext=something to search
group.p.or=true
group.1_path=/content/connect/it/supplier
group.2_path=/content/connect/it/xyz
于 2019-06-21T12:18:36.550 回答
0

relPath 总是将搜索限制在指定的元素。使用这种方法,您将无法实现目标。您可以删除 group.2 的 relPath,这可能会给您带来太多结果。

于 2019-06-12T14:40:03.987 回答
0

尝试:

path:/content/connect/it/supplier
orderBy:@jcr:score
p.limit:-1

fulltext=*something to search*
group.p.or:true
group.1_relPath:jcr:content
group.2_relPath:jcr:content/service/legal

那应该行得通。请参阅以下链接:

  1. https://helpx.adobe.com/experience-manager/6-2/sites/developing/using/querybuilder-api.html
  2. http://www.aemcq5tutorials.com/tutorials/adobe-aem-cq5-tutorials/aem-query-builder/
于 2019-06-11T11:13:38.767 回答