I was going through the documentation of predicates supported in querybuilder API: https://experienceleague.adobe.com/docs/experience-manager-65/developing/platform/query-builder/quer...
Where I see:
But I am not sure how to use it?
I tried keeping it as is:
```
type=nt:unstructured
path=/content/dam/rallyhealth/ichabod/articles
p.hits=selective
nodename=master
p.properties=author featuredImage
contentfragment
```
I also tried:
```
type=nt:unstructured
path=/content/dam/rallyhealth/ichabod/articles
p.hits=selective
nodename=master
p.properties=author featuredImage
contentfragment=article
```
But all of this return no response. Can someone help me understand how can one use it?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @spidey1405,
In general contentFragment predicate checks, if there is a contentFragment property with true value, located under jcr:content node. Base on that contentFragment predicate decides if given resource is recognized as content fragment or not and if it should be included in the results.
How to use it? Here is an example of predicate - it worked correct, and I get CF only as a result.
type=dam:Asset path=/content/dam contentfragment
contentFragment predicate does not require any additional value if you want to use it. Using contentFragment keyword in query will be enough. However I believe it will only return proper results if you will use it with dam:Asset type. At least it was working for me with dam:Asset type, which make sens because this will allow to use dedicated index related to dam:Asset type.
Hi @spidey1405,
In general contentFragment predicate checks, if there is a contentFragment property with true value, located under jcr:content node. Base on that contentFragment predicate decides if given resource is recognized as content fragment or not and if it should be included in the results.
How to use it? Here is an example of predicate - it worked correct, and I get CF only as a result.
type=dam:Asset path=/content/dam contentfragment
contentFragment predicate does not require any additional value if you want to use it. Using contentFragment keyword in query will be enough. However I believe it will only return proper results if you will use it with dam:Asset type. At least it was working for me with dam:Asset type, which make sens because this will allow to use dedicated index related to dam:Asset type.
Got it, makes sense. Thanks a lot Lukasz
could you please give me any reference how to put "contentfragment" predicate in java query map.
Is this like map.put("contentfragment","");
Views
Replies
Total Likes