I am trying to retrieve content fragments from the "ponto-de-parada" model that have the type value "Toll". However, I am not able to get this specific result. It is returning all the fragments based on the "ponto-de-parada" model, including fragments that are not of type "Toll".
What could be wrong and how can I fix it?
Solved! Go to Solution.
Views
Replies
Total Likes
A small modification is required for the queryParameterMap: change "property_2" to "2_property."
//HERE BELOW IT'S THE PROPERTY THAT I WANT TO GET IN CONTENT FRAGMENT
queryParameterMap.put("group.2_group.2_property", JcrConstants.JCR_CONTENT + "/data/master/type");
queryParameterMap.put("group.2_group.2_property.value", "Toll");
You can check an example here: https://experienceleague.adobe.com/docs/experience-manager-65/developing/platform/query-builder/quer...
A small modification is required for the queryParameterMap: change "property_2" to "2_property."
//HERE BELOW IT'S THE PROPERTY THAT I WANT TO GET IN CONTENT FRAGMENT
queryParameterMap.put("group.2_group.2_property", JcrConstants.JCR_CONTENT + "/data/master/type");
queryParameterMap.put("group.2_group.2_property.value", "Toll");
You can check an example here: https://experienceleague.adobe.com/docs/experience-manager-65/developing/platform/query-builder/quer...
Hello @NathanVieira
I have also optimized the query a bit. Please check if it suffices your need
type=dam:Asset
1_group.1_path=/content/dam/conteúdo-multicanal/rodovias/conteudo/taxas-de-pedagio/riosp
1_group.2_path=/content/dam/conteúdo-multicanal/rodovias/conteudo/ponto-de-parada/riosp
1_group.p.or=true
property=jcr:content/data/cq:model
property.1_value=/conf/myproject/settings/dam/cfm/models/veiculos-com-multiplicadores
property.2_value=/conf/myproject/settings/dam/cfm/models/ponto-de-parada
property=jcr:content/data/master/type
property.value=Toll
"This solution didn't work; I need to retrieve content fragments from both models, and only in the 'ponto-de-parada' model, return those that are of type 'Toll'.
I tested it in the QueryBuilder Debugger, and in the way you suggested, it only returns fragments from the 'ponto-de-parada' model because the second property invalidates the first"
type=dam:Asset
1_group.1_path=/content/dam/conteudo-multicanal/rodovias/conteudo/pt/taxas-de-pedagio/riosp
1_group.2_path=/content/dam/conteudo-multicanal/rodovias/conteudo/pt/ponto-de-parada/riosp
1_group.p.or=true
property=jcr:content/data/cq:model
property.value=/conf/App-Rodovias/settings/dam/cfm/models/veiculos-com-multiplicadores
property.2_value=/conf/App-Rodovias/settings/dam/cfm/models/ponto-de-parada
property=jcr:content/data/master/type
property.value=Toll
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies