AEM 查询生成器在搜索中排除文件夹 [英] AEM Query builder exclude a folder in search

查看:62
本文介绍了AEM 查询生成器在搜索中排除文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要创建一个查询,其中的参数如下:

I need to create a query where the params are like:

queryParams.put("path", "/content/myFolder");
queryParams.put("1_property", "myProperty");
queryParams.put("1_property.operation", "exists");
queryParams.put("p.limit", "-1");

但是,我需要排除这个总文件夹中的某个路径,比如:"/content/myFolder/wrongFolder" 并在所有其他文件夹中搜索(其编号不断变化)

But, I need to exclude a certain path inside this blanket folder , say: "/content/myFolder/wrongFolder" and search in all other folders (whose number keeps on varying)

有办法吗?我在网上没找到.

Is there a way to do so ? I didn't find it exactly online.

我也尝试了 unequals 操作,因为父路径被保存在 JCR 属性中,但仍然没有运气.我实际上需要 unlike 来避免路径的所有出现.但没有这样的事情:

I also tried the unequals operation as the parent path is being saved in a JCR property, but still no luck. I actually need unlike to avoid all occurrences of the path. But there is no such thing:

path=/main/path/to/search/in
group.1_property=cq:parentPath
group.1_property.operation=unequals
group.1_property.value=/path/to/be/avoided
group.2_property=myProperty
group.2_property.operation=exists
group.p.or=true
p.limit=-1

推荐答案

这是在给定的特定组 ID 上指定运算符的查询.

Here is the query to specify operator on given specific group id.

path=/content/course/
type=cq:Page
p.limit=-1
1_property=jcr:content/event

group.1_group.1_group.daterange.lowerBound=2019-12-26T13:39:19.358Z
group.1_group.1_group.daterange.property=jcr:content/xyz

group.1_group.2_group.daterange.upperBound=2019-12-26T13:39:19.358Z
group.1_group.2_group.daterange.property=jcr:content/abc

group.1_group.3_group.relativedaterange.property=jcr:content/courseStartDate
group.1_group.3_group.relativedaterange.lowerBound=0
group.1_group.2_group.p.not=true
group.1_group.1_group.p.not=true

这篇关于AEM 查询生成器在搜索中排除文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆