Nested Logic in QueryBuilder
I am trying to modify querybuilder code to nest some conditions.
The section of my querybuilder code is as follows:
fulltext=searchterm
group.0_path=/content/path1
group.0_path.self=true
group.1_path=/content/path2
group.1_path.self=true
group.p.or=true
orderby=@jcr:score
orderby.sort=desc
property=jcr:content/excludeFromSearch
property.operation=not
2_property=jcr:content/cq:redirectTarget
2_property.operation=not
type=cq:Page
p.limit=-1
Resulting XPath is:
//element(*, cq:Page)
[
(jcr:contains(., 'searchterm')
and not(jcr:content/@excludeFromSearch)
and not(jcr:content/@5644378:redirectTarget))
]
order by @6655266:score descending
I would like to add a 3rd property that can be grouped with the second, so the logic is
not(jcr:content/@excludeFromSearch)
and
(not(jcr:content/@cq:redirectTarget) or (jcr::content/@NEWPROPERTY))
The new property, if it exists, will negate the cq:redirectTarget property. Any help is appreciated.