Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Not able to open Content Fragment Model

Avatar

Level 8

Hello All,

 

I am not able to open my content fragment model to edit.  Getting below mentioned error. Any help in this case?

 

GET /mnt/overlay/dam/cfm/models/editor/content/editor.html/conf/abc/settings/dam/cfm/models/my-model HTTP/1.1] 
org.apache.jackrabbit.oak.query.QueryImpl Traversal query (query without index): select [jcr:path], [jcr:score], 
* from [dam:Asset] as a where [jcr:content/contentFragment] = 'true' and [jcr:content/data/cq:model] = 
'/conf/abc/settings/dam/cfm/models/my-model' and isdescendantnode(a, '/content/dam') option(index tag [fragments]) 
/* xpath: /jcr:root/content/dam//element(*, dam:Asset)[(jcr:content/@contentFragment = 'true' and jcr:content/data/@cq:model =
 '/conf/abc/settings/dam/cfm/models/my-model')] option (index tag fragments) */; consider creating an index
 
GET /mnt/overlay/dam/cfm/models/editor/content/editor.html/conf/abc/settings/dam/cfm/models/my-model HTTP/1.1] 
org.apache.jackrabbit.oak.plugins.index.Cursors$TraversingCursor Traversed 1000 nodes with filter Filter(query=select [jcr:path], 
[jcr:score], * from [dam:Asset] as a where [jcr:content/contentFragment] = 'true' and [jcr:content/data/cq:model] 
= '/conf/abc/settings/dam/cfm/models/my-model' and isdescendantnode(a, '/content/dam') option(index tag [fragments]) 
/* xpath: /jcr:root/content/dam//element(*, dam:Asset)[(jcr:content/@contentFragment = 'true' and jcr:content/data/@cq:model 
= '/conf/abc/settings/dam/cfm/models/my-model')] option (index tag fragments) */, path=/content/dam//*, 
property=[:indexTag=[fragments], jcr:content/contentFragment=[true], 
jcr:content/data/cq:model=[/conf/abc/settings/dam/cfm/models/my-model]]); consider creating an index or changing the query
GET /mnt/overlay/dam/cfm/models/editor/content/editor.html/conf/abc/settings/dam/cfm/models/my-model HTTP/1.1] 
org.apache.jackrabbit.oak.query.FilterIterators The query read or traversed more than 500000 nodes.
 
org.apache.jackrabbit.oak.query.RuntimeNodeTraversalException: The query read or traversed more than 500000 nodes. 
To avoid affecting other tasks, processing was stopped.
at org.apache.jackrabbit.oak.query.FilterIterators.checkReadLimit(FilterIterators.java:70)
at org.apache.jackrabbit.oak.plugins.index.Cursors$TraversingCursor.fetchNext(Cursors.java:341)
at org.apache.jackrabbit.oak.plugins.index.Cursors$TraversingCursor.next(Cursors.java:320)
1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @Mahesh_Gunaje,

The error says that AEM could not find a suitable index for the content fragment model and so it fell back to traverse node-by-node. Traversing is the last step that AEM takes when it cannot find an index to use, and it is very costly performance wise.

 

The error also provides the next steps to create an index matching the query path:

 

consider creating an index or changing the query

 

 

It also mentions that it stopped processing to avoid harm or slowing down AEM:

 

The query read or traversed more than 500000 nodes. 
To avoid affecting other tasks, processing was stopped.

 

 
The query for which index needs to be created

 

select [jcr:path], [jcr:score], 
* from [dam:Asset] as a where [jcr:content/contentFragment] = 'true' and [jcr:content/data/cq:model] = 
'/conf/abc/settings/dam/cfm/models/my-model' and isdescendantnode(a, '/content/dam') option(index tag [fragments]) 

 

 

Please refer to this Adobe documentation section on index creation,

https://experienceleague.adobe.com/docs/experience-manager-65/deploying/deploying/queries-and-indexi...

 

 

 

thanks,

Preetpal

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hello @Mahesh_Gunaje,

The error says that AEM could not find a suitable index for the content fragment model and so it fell back to traverse node-by-node. Traversing is the last step that AEM takes when it cannot find an index to use, and it is very costly performance wise.

 

The error also provides the next steps to create an index matching the query path:

 

consider creating an index or changing the query

 

 

It also mentions that it stopped processing to avoid harm or slowing down AEM:

 

The query read or traversed more than 500000 nodes. 
To avoid affecting other tasks, processing was stopped.

 

 
The query for which index needs to be created

 

select [jcr:path], [jcr:score], 
* from [dam:Asset] as a where [jcr:content/contentFragment] = 'true' and [jcr:content/data/cq:model] = 
'/conf/abc/settings/dam/cfm/models/my-model' and isdescendantnode(a, '/content/dam') option(index tag [fragments]) 

 

 

Please refer to this Adobe documentation section on index creation,

https://experienceleague.adobe.com/docs/experience-manager-65/deploying/deploying/queries-and-indexi...

 

 

 

thanks,

Preetpal

Avatar

Community Advisor

@Mahesh_Gunaje 

 

There have been some issues with the content fragment index. You might want to check release notes.

Which Service pack are you using currently?

 

There was one suggestion in https://docs.mktossl.com/docs/experience-manager-65/release-notes/service-pack/6.5.11.html?lang=en 

When trying to move/delete/publish either Content Fragments or Sites/Pages, there is an issue when Content Fragment references are fetched, as the background query will fail; that is, the functionality will not work.
To ensure correct operation you need to add the following properties to the index definition node /oak:index/damAssetLucene (no re-indexing is required) :

"tags": [
    "visualSimilaritySearch"
  ]
"refresh": true

Aanchal Sikka

Avatar

Level 8

Hi @aanchal-sikka 

I am using 6.5.13 version. Added these details in damAssetLucene

"tags": [
    "visualSimilaritySearch"
  ]
"refresh": true

. Still same issue.