Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Query for Content fragment

Avatar

Level 3

Hi Team,

There is one requirement where i need to fetch the list of Content Fragment through query builder which is having a keyword "profile" in its body. Can someone help me to get the exact query please?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@skumari you can try like below

 

type=dam:Asset
path=/content/dam
boolproperty=jcr:content/contentFragment
boolproperty.value=true
property=jcr:content/data/cq:model
property.value=/conf/wknd-shared/settings/dam/cfm/models/adventure
fulltext=profile
fulltext.relPath=jcr:content/data/master

 

Check the examples here https://sourcedcode.com/blog/aem/aem-query-builder-examples-with-content-fragments and you can modify it for your models.

 

 

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

@skumari you can try like below

 

type=dam:Asset
path=/content/dam
boolproperty=jcr:content/contentFragment
boolproperty.value=true
property=jcr:content/data/cq:model
property.value=/conf/wknd-shared/settings/dam/cfm/models/adventure
fulltext=profile
fulltext.relPath=jcr:content/data/master

 

Check the examples here https://sourcedcode.com/blog/aem/aem-query-builder-examples-with-content-fragments and you can modify it for your models.

 

 

Avatar

Community Advisor

Hi @skumari 
please try below query:
http://localhost:4502/libs/cq/search/content/querydebug.html 
type=dam: Asset
path=/content/dam
1_property=jcr:content/jcr:data
1_property.value=/jcr:root/content/dam/%/jcr:content
1_property.operation=like
p.limit=-1

Thanks.