Recently I was working on an intranet solution based on SharePoint Online. One of the requirements was to show an overview of recently edited documents. A perfect job for the Content Search WebPart (CSWP).
After the configuration of the CSWP I found out that, by default, the results link direclty to the file, for example:
This results in a file download instead of opening it in Office Online, not very user friendly. This behavior is because of the default value “Path” of Link URL in the Property Mappings.
If you want to open a search result directly in one of the Office Web Apps you need to set the value of Link URL to “ServerRedirectURL“.
This will result in the following url:
The document will now open in one of the Office Web Apps, in this case Excel Online. The end user can now see the contents of the document in Office Online and choose one of the Edit options, in browser or using the local Office client.