November Happy Hour will be moved to Thursday December 5th.

Content Graph not returning any results

Vote:
 

I have a CMS 12 site where I have configured Content graph. After  I ran the index, I can see all content types in graph playground however when I query for items I get empty results. From my logs I can see that the contents json were infact sent to the index. Unfortunately I cannot attach screenshots but here is all what was done

  1. Setup content graph
  2. Got content graph clients generated based on the queries (verified)

I tried doing the same with Alloy project using our default integration content graph single key and was able to see query results however it is not working in our client solution. Based on some troubleshooting I even configured content graph to index only specific pages and also pages with ids. Below sample code

        services.AddContentGraph(configureOptions: options =>
        {
            options.SynchronizationEnabled = true;
            options.Include.ContentTypes = new string[] {
            typeof(TestPage).Name,
            typeof(GenericFullWidthPage).Name,

            };
            options.OnlySyncContentTypesInWhitelistToSchema = true;
            options.ContentVersionSyncMode = Optimizely.ContentGraph.Cms.Configuration.ContentVersionSyncMode.PublishedOnly;

            //options.Include.ContentTypes = new string[] {
            //    typeof(TestPage).Name,
            //};
            options.Include.ContentIds = new int[] { 16,15 }; // Set the ID of test page
            //options.OnlySyncContentTypesInWhitelistToSchema = true;
            //options.ContentVersionSyncMode = Optimizely.ContentGraph.Cms.Configuration.ContentVersionSyncMode.PublishedOnly;
        });

I am going to have trouble shooting session with Opti support but want to see if anyone had similar issues and what could be the root cause

#330115
Sep 17, 2024 14:12
Vote:
 

Although I haven't personally experienced exactly this issue, I have had cases where specific content has not been synchronised, to that end have you checked the journals section under the "Optimizely Graph content synchronization job" scheduled job? 

If you click the details link on one of the runs it will take you to a screen that shows you all of the synchronisation journals.

You can click on the journal IDs and this will present you with some JSON where you can check for any synchronization errors:

Hope this helps, and that your session with Opti support gets you sorted.

#330161
Sep 18, 2024 6:49
Vote:
 

Thanks for the response. I had those things validated already. Turns out I had custom contentapi model filter where in the status was set to null which was causing the serializer to ignore published content types. After removing that, I could see the responses.

#330268
Sep 19, 2024 23:10
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.