Not able to open Content Fragment Model | Community
Skip to main content
New Participant
December 16, 2023
Solved

Not able to open Content Fragment Model

  • December 16, 2023
  • 2 replies
  • 968 views

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)
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Preetpal_Bindra

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-indexing.html?lang=en

 

 

 

thanks,

Preetpal

2 replies

aanchal-sikka
New Participant
December 18, 2023

@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
New Participant
December 20, 2023

Hi @aanchal-sikka 

I am using 6.5.13 version. Added these details in damAssetLucene

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

. Still same issue. 

Preetpal_Bindra
Preetpal_BindraAccepted solution
New Participant
December 16, 2023

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-indexing.html?lang=en

 

 

 

thanks,

Preetpal