SharePoint 2013: Using the search REST service from an app for SharePoint

A new code sample has been released on MSDN that demonstrates how to return search results in an app for SharePoint.

“The SearchApp sample accepts a query using the keyword query language (KQL) syntax as an input. It subsequently makes a call to the search engine using the search Representational State Transfer (REST) service. The results are then displayed in a table, which is built dynamically using JQuery and JavaScript.”

The screen shot below shows search results displayed on the home page of the sample:

Figure 1. Home.aspx page in the app, displaying the search results

SharePoint 2013 Search Sample

Go get it here and even more SharePoint 2013 sample code here.

SharePoint Installation with SQL Alias

As a best practice, SharePoint should be installed using a SQL alias.

Think of a SQL alias like a DNS record, but also being able to refer to a specific SQL instance name.

If you need to upgrade database servers in the future, you will usually be keeping the existing DB server in place, and creating a separate DB server environment (e.g. SQL 2005 vs SQL 2008). If you had your SharePoint installation configured with the server name details of the SQL 2005 environment, then now you have to undertake a long and arduous process to move to 2008.

If you configured the environment with a SQL alias – then you can just go and update the alias on each of the SharePoint servers to point at the new SQL 2008 environment. Much simpler!!

Note: When installing SharePoint with a SQL alias, you need to make sure that you set up the alias on EACH and EVERY SharePoint server.  Miss one and the box won’t be able to connect to the required database server(s).

The command to bring up the SQL Alias Client Config Utility is: cliconfg