Expand my Community achievements bar.

SOLVED

Issue Service outage looks like we are having some issues with our service we are working hard to bring it online again AEM

Avatar

Level 3

I have a contentfragment list type component that returns content fragments according to the logic of my queryBuilder. However, in the cloud environment, there are many content fragments, and when I try to render the search results, it displays this error:

"Service outage looks like we are having some issues with our service we are working hard to bring it online again AEM."

The page is black with no content in the editing panel and also in the "view as published" mode. In the editing panel, I can't even select the component to delete it from the left sidebar.

Below is the code for my query:

Map<String, String> queryParameterMap = new HashMap<>();
queryParameterMap.put("type", NT_DAM_ASSET);
queryParameterMap.put("p.limit", Integer.toString(maxItems));

queryParameterMap.put("group.p.or", "true");
queryParameterMap.put("group.1_group.path", "/content/dam/conteudo-multicanal/rodovias/conteudo/" + languagePageValue + folderNameTaxasDePedagio + concessionaryNameValue);
queryParameterMap.put("group.2_group.path", "/content/dam/conteudo-multicanal/rodovias/conteudo/" + languagePageValue + folderNamePontoDeParada + concessionaryNameValue); //tollPath + concessionaryNameValue //REMOVE CONCESSIONARY NAME VALUE IN CLOUD SERVER, LET ONLY tollPath

queryParameterMap.put("group.1_group.property", JcrConstants.JCR_CONTENT + "/data/cq:model");
queryParameterMap.put("group.1_group.property.value", "/conf/App-Rodovias/settings/dam/cfm/models/veiculos-com-multiplicadores");

queryParameterMap.put("group.2_group.property", JcrConstants.JCR_CONTENT + "/data/cq:model");
queryParameterMap.put("group.2_group.property.value", "/conf/App-Rodovias/settings/dam/cfm/models/ponto-de-parada");
queryParameterMap.put("group.2_group.2_property", JcrConstants.JCR_CONTENT + "/data/master/type");
queryParameterMap.put("group.2_group.2_property.value", "Toll");

//All the variables are correct because I can retrieve them correctly in the local environment.

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @NathanVieira 

 

Query optimization:

I had shared optimized query for you in previous post Solved: How to resolve and return correctly content fragme... - Adobe Experience League Community - ...

I guess you had to keep code changes to minimum, so it was not taken into account

 

Please check, if its performing better than existing query. Even if it does not, please do share the feedback still. 

 

Index optimization:

- Assure that all fields used in the query are indexed. 

- Also sharing the best practices around indexing and query https://experienceleague.adobe.com/docs/experience-manager-65/deploying/practices/best-practices-for... . Please check what is applicable for you

 

 

 

 


Aanchal Sikka

View solution in original post

9 Replies

Avatar

Community Advisor

Most likely your query is not performant causing a timeout and thus the issue you are seeing.

Please check your query using the Diagnosis Tool. You could use the following articles which explain how to check if your query is performant:

 

https://wttech.blog/blog/2020/jcr-query-performance/

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/operations/query-an... 



Esteban Bustamante

Avatar

Level 3

In my case, in the search I perform with the QueryBuilder, it retrieves content fragments from 2 different data models, "veiculos-com-multiplicadores" and "ponto-de-parada," and in the "ponto-de-parada" model, it retrieves all fragments of the "Toll" type.

How can I adjust this code to be more performant?

Avatar

Community Advisor

Some quick ideas:

- Check if your query needs a custom index, 

- Check if you can change the type of the node you are trying to traverse

 

It is not that you necessarily need to change the query but make sure it runs in the optimal conditions as well, please check the articles i posted which contains more ideas. 

 



Esteban Bustamante

Avatar

Correct answer by
Community Advisor

Hello @NathanVieira 

 

Query optimization:

I had shared optimized query for you in previous post Solved: How to resolve and return correctly content fragme... - Adobe Experience League Community - ...

I guess you had to keep code changes to minimum, so it was not taken into account

 

Please check, if its performing better than existing query. Even if it does not, please do share the feedback still. 

 

Index optimization:

- Assure that all fields used in the query are indexed. 

- Also sharing the best practices around indexing and query https://experienceleague.adobe.com/docs/experience-manager-65/deploying/practices/best-practices-for... . Please check what is applicable for you

 

 

 

 


Aanchal Sikka

Avatar

Level 3

The solution didn't work; it's returning only fragments from the "ponto-de-parada" model of type "Toll" because the second property invalidates the first one.

Avatar

Community Advisor

@NathanVieira 

 

May be I am not reading your requirement correctly. Apologies for that

 

Following is working fine for me:

- Both CF are in different paths

- They have different models

- They have value type=Toll

 

aanchalsikka_0-1695734507775.png

 

aanchalsikka_1-1695734540670.png

 

aanchalsikka_2-1695734557255.png

 


Aanchal Sikka

Avatar

Level 3

The type Toll only exists in ponto-de-parada model, the model veiculo-com-multiplicadores doesn't need these type

Avatar

Community Advisor

@NathanVieira 

In case the query is using damAssetLucene index, it doesn't seem to have cq:model property declared for indexing. 

 

For query to perform well, both cq:model and type would need to be part of Index


Aanchal Sikka

Avatar

Administrator

@NathanVieira Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni