I have a query as below:
path=/home/project/users
property=customGroup
property.value=Unverified
type=rep:User
From this result I need to filter whose
registrationCompletedDate or jcr:createdDate value is greater than 5 days Both these properties are of type Date.
Can you help how I need to modify the query ? Do we have any property to get the dte greater than a particular value?
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @pn_2007,
You can make use of predicate named "relativedaterange" to achieve this.
Below is the sample query. (To get all assets that are modified 5 days before)
path=/content/dam/learnings
type=dam:Asset
relativedaterange.property=jcr:content/jcr:lastModified
relativedaterange.lowerBound=-5d (If no upperBound is specified, it is treated as 0, indicating current time)
p.limit=-1
If any Date property which is in future like say eventDate and to get all events that will happen in next 5 days, then the query will be like
path=/content/dam/learnings
type=dam:Asset
relativedaterange.property=jcr:content/eventDate
relativedaterange.upperBound=5d (If no lowerBound is specified, it is treated as 0, indicating current time)
p.limit=-1
Other options in detail about this predicate in below link
Hi @pn_2007,
You can make use of predicate named "relativedaterange" to achieve this.
Below is the sample query. (To get all assets that are modified 5 days before)
path=/content/dam/learnings
type=dam:Asset
relativedaterange.property=jcr:content/jcr:lastModified
relativedaterange.lowerBound=-5d (If no upperBound is specified, it is treated as 0, indicating current time)
p.limit=-1
If any Date property which is in future like say eventDate and to get all events that will happen in next 5 days, then the query will be like
path=/content/dam/learnings
type=dam:Asset
relativedaterange.property=jcr:content/eventDate
relativedaterange.upperBound=5d (If no lowerBound is specified, it is treated as 0, indicating current time)
p.limit=-1
Other options in detail about this predicate in below link
It worked. Thank you.
Try something as below
p.limit=-1
p.hits=full
path=/home/project/users
property=customGroup
property.value=Unverified
type=rep:User
group.1_relativedaterange.property=jcr:created
group.1_relativedaterange.upperBound=-5d
group.2_relativedaterange.property=registrationCompletedDate
group.2_relativedaterange.upperBound=-5d
group.p.or=true
Even you can use daterange instead of relativedaterange.
Regards
Albin I
Views
Likes
Replies
Views
Likes
Replies