After code deployment to AEM, jcr:primaryType gets converted to nt:folder from nt:unstructured

Avatar

Avatar
Validate 1
Level 1
10024
Level 1

Likes

0 likes

Total Posts

16 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
10024
Level 1

Likes

0 likes

Total Posts

16 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
10024
Level 1

27-01-2021

Hi Everyone, we tried to implement synonyms in AEM. We followed the steps in this blog:

https://www.albinsblog.com/2020/05/how-to-enable-search-synonyms-in-aem-with-lucene.html

It is already working on the local however to implement this changes to AEM instance, we need to add the changes to the solution and build. After building the solution, it is no longer working in AEM instance. 

 

Expectation:

0424_1-1611736684922.png

 

Actual Result:

0424_0-1611736575266.png

 

I would like to know if you have encountered this issue? 

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar
Ignite 1
Level 3
khamat_bn
Level 3

Likes

31 likes

Total Posts

55 posts

Correct reply

12 solutions
Top badges earned
Ignite 1
Give Back 3
Give Back
Boost 5
Boost 3
View profile

Avatar
Ignite 1
Level 3
khamat_bn
Level 3

Likes

31 likes

Total Posts

55 posts

Correct reply

12 solutions
Top badges earned
Ignite 1
Give Back 3
Give Back
Boost 5
Boost 3
View profile
khamat_bn
Level 3

29-01-2021

Hi ,

This issue we recenty encounter and its because when we package the oak synonynms it will have only one content.xml file which includes all nodes and its types information like nt:unstructured.

So instead of putting same structure in IDE for build we need to add content.xml in each level with node details primary type.

Like in your case content.xml on same level of analyser folder and need to put the .content.xml whith primaryType as nt:unstructure, and instead of <jcr:root> you need to add <analyser>. Same for other node also.

 

Please let me know if you require more info 🙂

 

Avatar

Avatar
Applaud 50
Level 5
diksha_mishra
Level 5

Likes

79 likes

Total Posts

93 posts

Correct reply

39 solutions
Top badges earned
Applaud 50
Applaud 25
Give Back 5
Boost 50
Affirm 25
View profile

Avatar
Applaud 50
Level 5
diksha_mishra
Level 5

Likes

79 likes

Total Posts

93 posts

Correct reply

39 solutions
Top badges earned
Applaud 50
Applaud 25
Give Back 5
Boost 50
Affirm 25
View profile
diksha_mishra
Level 5

27-01-2021

It seems the primary type has changed from a file to a folder here. Please click on the folder and check the properties. You can modify the jcr:primaryType=sling:Folder to the correct primaryType by doing a comparison on local setup.

Usual types can be:

sling:OsgiConfig, dam:Asset etc. 

Also share the logs here which can help identify the issue further.

10024

Yes it seems that after deployment, the jcr:primaryType gets converted to nt:folder from nt:unstructured. There's no error in the logs, I only see this:

 

27.01.2021 21:46:43.348 *INFO* 

org.apache.jackrabbit.vault.packaging.impl.ActivityLog com.test.assets:assets-test.ui.apps:1.0.0-SNAPSHOT: INSTALL 2021-01-27 21:46:43.348 DEBUG [com.test.assets.core.listeners.SimpleResourceListener] Resource event: org/apache/sling/api/resource/Resource/ADDED at: /oak:index/Lucene/analyzers/default/filters/Synonym/synonym.txt/jcr:content 2021-01-27 21:46:43.348 DEBUG [com.test.assets.core.listeners.SimpleResourceListener] Resource event: org/apache/sling/api/resource/Resource/ADDED at: /oak:index/Lucene/analyzers/default/filters/Synonym/synonym.txt/jcr:content 2021-01-27 21:46:43.348 DEBUG [com.test.assets.core.listeners.SimpleResourceListener] Resource event: org/apache/sling/api/resource/Resource/ADDED at: /oak:index/Lucene/analyzers/default/filters/Synonym 2021-01-27 21:46:43.348 DEBUG [com.test.assets.core.listeners.SimpleResourceListener] Resource event: org/apache/sling/api/resource/Resource/ADDED at: /oak:index/Lucene/analyzers/default/filters/Synonym 2021-01-27 21:46:43.348 DEBUG [com.test.assets.core.listeners.SimpleResourceListener] Resource event: org/apache/sling/api/resource/Resource/ADDED at: /oak:index/Lucene/analyzers/default/filters/Synonym/synonym.txt 2021-01-27 21:46:43.348 DEBUG [com.test.assets.core.listeners.SimpleResourceListener] Resource event: org/apache/sling/api/resource/Resource/ADDED at: /oak:index/Lucene/analyzers/default/filters/Synonym/synonym.txt 2021-01-27 21:46:43.349 DEBUG [com.test.assets.core.listeners.SimpleResourceListener] Resource event: org/apache/sling/api/resource/Resource/ADDED at: /oak:index/Lucene/analyzers/default/filters 2021-01-27 21:46:43.349 DEBUG [com.test.assets.core.listeners.SimpleResourceListener] Resource event: org/apache/sling/api/resource/Resource/ADDED at: /oak:index/Lucene/analyzers/default/filters 2021-01-27 21:46:43.349 DEBUG [com.test.assets.core.listeners.SimpleResourceListener] Resource event: org/apache/sling/api/resource/Resource/ADDED at: /oak:index/Lucene/analyzers/default 2021-01-27 21:46:43.349 DEBUG [com.test.assets.core.listeners.SimpleResourceListener] Resource event: org/apache/sling/api/resource/Resource/ADDED at: /oak:index/Lucene/analyzers/default 2021-01-27 21:46:43.349 DEBUG [com.test.assets.core.listeners.SimpleResourceListener] Resource event: org/apache/sling/api/resource/Resource/ADDED at: /oak:index/Lucene/analyzers 2021-01-27 21:46:43.349 DEBUG [com.test.assets.core.listeners.SimpleResourceListener] Resource event: org/apache/sling/api/resource/Resource/ADDED at: /oak:index/Lucene/analyzers