Query to fetch assets with either offTime doesn't exists or offTime greater than current time.
Please see my query below.
p.limit=-1
p.offset=0
path=/content/dam
type=dam:Asset
1_property=jcr:content/cq:lastReplicationAction_scene7
1_property.value=Activate
2_property=jcr:content/cq:lastReplicationAction
2_property.value=Activate
3_group.or=true
3_group.1_property=jcr:content/metadata/custom:assetType
3_group.1_property.1_value=image
3_group.1_property.2_value=document
3_group.1_property.1.operation=equals
3_group.1_property.2.operation=equals
4_group.or=true
4_group.1_property.operation=not
4_group.1_property=jcr:content/offTime
4_group.2_daterange.property=jcr:content/offTime
4_group.2_daterange.operation=>=
4_group.2_daterange.lowerBound=1729147820649
orderby.sort=asc
orderby=@jcr:content/jcr:lastModified
The corresponding XPath generated is,
/jcr:root/content/dam//element(*, dam:Asset)
[
((jcr:content/metadata/@custom:assetType = 'document' or jcr:content/metadata/@custom:assetType = 'image'))
and (not(jcr:content/@8690475)
and (jcr:content/@8690475 > xs:dateTime('2024-10-17T06:50:20.649Z')))
and (jcr:content/@5644378:lastReplicationAction_scene7 = 'Activate' and jcr:content/@5644378:lastReplicationAction = 'Activate')
]
order by jcr:content/@6655266:lastModified
But what I'm looking is those assets where the offTime doesn't exist or offTime greater than current time, which should be an OR condition. But what I'm getting is an AND condition. How do I solve this?