We have a catalog set up for cross-site publishing and have connected it up with our user site. We've set up the managed catalog to rewrite the urls to the local site.
We use content search webparts to display the items on our catalog pages. If I use the debugger to pause the item template when it is rendering I can inspect
ctx.CurrentItem and see that there is an OriginalPath property which points to the authoring side and there is a Path property which is rewritten to the local site. This is as it should be.
When I search for the same item, I see the OriginalPath, but the Path property is empty in the search results. This means that the link in the search results goes nowhere.
I found this thread which talks about adding ServerRedirectedURL to a custom item template. I'm just using the OOTB templates -- default, item, commonbody, etc. I did notice that several of the do not have the ServerRedirectedURL property in the mapping, so I added it to them. That didn't work, and I see the ServerRedirectedURL property is always
I also tried using the REST search api. When I query for the same items the Path is also empty.
What is it that CSWP knows that Search Results webpart and REST api don't?
How can I get the rewritten, local, friendly Path for my search results items?