Unable to search for pages in SharePoint Online when using Managed Navigation

This is a summary of an issue we have had with publishing pages not being indexed, and then unable to build the search-driven pages we wanted using for example Content Search Web Part. This occured in SharePoint Online (Office 365) and we have only had this issue with a couple of tenants. So my guess is that most tenants are working fine, but if you should come across this strange behavior, I hope this post can help you save some time.

The issue

I guess you get it. Something was very wrong and I was stuck on not getting any results back. On-Premises this would probable been one of those situations a full crawl, or at worst a index reset, had fixed it. But running in Office 365 we don't have these abilities.

The workaround

After some trial and error I understood what was causing the issue, and got this workaround:

search-mn-error-1

All pages created and published after making this change was indexed and showed up as expected. Unfortunately all the pages created before doing this change was a lost cause. Believe me, I tried a lot but unable to get them indexed.

The fix

As being on Office 365 this issue was addressed with Microsoft Support, and after a while they released a fix.

Unfortunately I suspect this error can still occur in some scenarios, and to make sure we don't run into this trouble again, a recommendation is to avoid using the Managed Navigation set up as shown above just to be safe.