A result source in SharePoint 2013 is used to segment certain types of content so they can be searched in a narrower fashion than searching against all content within the index. Using result sources, we can define query rules that must be met by the content in order for it to appear in search results. In previous versions of SharePoint this concept was addressed through search scopes.
SharePoint 2013 presents us with user interface in Central Administration where we are able to create new result sources and configure their properties:
However, at the time of writing this post, there is no Windows PowerShell cmdlet available to create a result source in SharePoint 2013. This is rather limiting, because as user-friendly as the browser interface is, we still need a way to automate search configuration, especially when developing and deploying solutions for a customer. It’s a fact of life that most SharePoint administrators do not make a happy face when being handed a thick document with manual actions to execute, especially if it needs to be done several times on different environments.
I have to admit SharePoint really got me with this one.
We had built a SharePoint Server 2013 environment for development and research purposes as soon as the RTM version was released. I remember configuring the Search Service Application and creating a Search Center to play with the new features back then, and everything was working quite well.
Then a couple of days ago I started creating a proof-of-concept for an upcoming SharePoint 2013 project, I fired up my suspended virtual machine only to find out that search had stopped working.
In the Search Center I was getting “Unexpected response from server“:
In this post we go through the step-by-step process of creating a SharePoint solution that deploys a publishing page layout and a publishing page for press releases. Provisioning page layouts and pages using features and solution packages (*.wsp) allows for improved code reuse and makes it easier to move the solution between environments (development, testing, staging, and production).
As a matter of fact, there are already quite a few examples on the web that cover the topic of creating a SharePoint 2010 publishing page layout in Visual Studio 2010. One particularly good article is posted from Becky Bertram on her blog here.
However, in a recent project of ours, we also needed to deploy publishing pages together with the page layout, and after coming up with the solution, we decided to share our experience. The SharePoint Developer Tools in Visual Studio 2010 do not include specific project item templates for doing this, but it can be achieved using the module item template.
Here is how our solution will look like when we are done:
Please note that in order to successfully deploy the solution the target SharePoint site should be a publishing site.
Managed Metadata is one the great new features introduced in SharePoint 2010. That’s why we decided to write a series of articles describing some common scenarios that could be useful in practice.
Our first article will demonstrate how to programmatically import a term set defined in a csv file.
Creating term sets and terms using the browser is very straightforward using the Term Store Management Tool in Central Administration. However, there are some cases when we are required to programmatically create a term set by importing a csv file with terms into the Managed Metadata term store in SharePoint 2010.
In the following walkthrough we show how to create a valid csv file with term sets. Then we take a look at some of the key steps of building a SharePoint farm solution that imports the csv file into the Managed Metadata term store using the standard SharePoint Server 2010 API.
Prepare the CSV Term Store File
Let’s start with showing how to create the csv file with the managed metadata we want to import.
The import process requires a file with the .csv extension formatted a specific way. For details on this format, see the following TechNet article. Even after reading through all the details on the format though, building the file from scratch could be quite tedious and time-consuming. The good news is that there is a much easier way to accomplish this task – by using the great macro enabled template created by Wictor Wilén in his article Create SharePoint 2010 Managed Metadata with Excel 2010.
Once we download the template, we click on the Create New Term Store Sheet ribbon button located in SharePoint 2010 group. This will open a new sheet in Excel where we can enter our term set information. After the information is in place, we click on the Create Term Store File ribbon button. This saves the sheet data as a .txt file and we manually change the file extension to .csv.
Welcome to our blog!
Here we will be posting tips and valuable insights on MS SharePoint and other top-notch technology. To prevent the blog from growing too ‘nerdy’, we will also keep you posted on interesting news and events in our company and the bigger technical community. So stay tuned, there’s more to come!
In the meantime, check out our brand-new website at www.tippoint.net