Configuring query rules
Query rules define how and what results are displayed to the end user. In our lab environment, we want to show search results from SharePoint Online above any local results when they search using the enterprise search centre. My logic here is that there will be far fewer files held in SharePoint Online to start with, and also if there are no results they won't be displayed.
Open up the Manage Query Rules page from Central Administration| Application Management | Manage Service Applications | Search Service Application and then click on Query Rules on the left-hand menu.
First we select a contact for our new rule, and in our case we want our rule to fire when the users search for Local SharePoint Results. This might sound wrong because we are trying to display results from SharePoint Online, but this is okay because the users will be searching locally, we are simply expanding the search for them.
Click on New Query Rule to begin configuring our SharePoint Online...