Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Core Search Content Fragments in Pages

Avatar

Level 4

I am working on rebuilding a site that was originally set up in 6.3. I've run into an issue with the Search feature where it's only searching the metadata for the page and not including the Content Fragments in the search. I've overlaid the Search and Content Fragment components from the Core Components bundle.

 

On our 6.3 instance, search is returning pages based on Content Fragment content but it is not on our 6.5 instance. The original site was built roughly 3 years ago, and I don't know if any configs were changed to enable search of CFs in pages for the results. 

 

I don't believe any modifications were made to the Oak Index. From what I've compared, things look the same on both instances. 

 

If there's an easy way to enable the core Search component to include searching the page Content Fragments, it would be hugely helpful.

1 Accepted Solution

Avatar

Correct answer by
Employee

Have you enabled debug logs for all the below apis , if not yet can you please do that. DEBUG logging configuration can be added for the following packages, write a separate log file. 

 

org.apache.jackrabbit.oak.plugins.index

org.apache.jackrabbit.oak.query

com.day.cq.search

 

After this, you can run a search both in working [6.3] and non-working [6.5] instance. This way, we can find out if anything is changed, and which particular index is being utilized in both the cases and the query triggering in the backend as well.

View solution in original post

5 Replies

Avatar

Correct answer by
Employee

Have you enabled debug logs for all the below apis , if not yet can you please do that. DEBUG logging configuration can be added for the following packages, write a separate log file. 

 

org.apache.jackrabbit.oak.plugins.index

org.apache.jackrabbit.oak.query

com.day.cq.search

 

After this, you can run a search both in working [6.3] and non-working [6.5] instance. This way, we can find out if anything is changed, and which particular index is being utilized in both the cases and the query triggering in the backend as well.

Avatar

Level 4

Thanks. I set up the logs, but they are huge. I'm not sure what I'm looking for, but I'm not seeing any red flags. Nothing in search related to content fragments.

I came across this yesterday for OSGi configs for Content Fragments -- https://docs.adobe.com/content/help/en/experience-manager-65/developing/extending-aem/content-fragments-config-components-rendering.html#osgi-service-content-fragment-component-configuration -- after finding older information for a deprecated setting that was not set up on my new instance but was on my old instance. I added my components to the configs but I'm not seeing any changes in the search results.

Avatar

Employee
Is the query triggering in the backend in query.log is same for both AEM 6.3, AEM 6.5? Which index is picking here?

Avatar

Level 4

They appear to be the same. I see references to /oak:index/cqPageLucene, /oak:index/lucene, and /oak:index/damAssetLucene.

 

I noticed that the OOTB Content Fragment component under General adds a text node to the content fragment node under the page. This node does not exist when using the Core Content Fragment component. If I add this node to the content fragment node under a page, the contents of that node will show in my search results.