Hi everyone, so when I need to add a query for contains I use like operation as shown below:
```
type=nt:unstructured
path=/content/dam/en/articles
nodename=master
orderby=@title
p.limit=0
p.skip=0
p.hits=selective
p.properties=jcr:path
property=primaryCategoryTag
property.value=%rally%
property.operation=like
```
However I have a use case where I need to do contains not, can someone help me to do the same? Is there any operation as `unlike`? Which helps me pick all those entities which doesn't contain the given text?
Solved! Go to Solution.
Views
Replies
Total Likes
I think this is not possible with QueryBuilder , you can create your own predicate e.g.
https://github.com/arunpatidar02/aem63app-repo/blob/master/java/CaseInsensitiveLikePredicate.java
or use SQL2
I think this is not possible with QueryBuilder , you can create your own predicate e.g.
https://github.com/arunpatidar02/aem63app-repo/blob/master/java/CaseInsensitiveLikePredicate.java
or use SQL2
If lets say I want to deploy these to AEM cloud locally, where am I supposed to add these files? Predicates that I create?
This is a java code, you have to deploy via code module.
Also the predicate that you have created, I was wondering if I can use it with groups? Like for example:
1_group.1_caseinsensitive.property=jcr:content/@jcr:title 1_group.1_caseinsensitive.value=queryString %
Will this work with your example? And if yes, can you please tell me where and how can I add this predicate in order to test it in my local AEM instance?
It is just an example, you have to write your own logic.
Views
Likes
Replies