Wednesday, August 26, 2015

“Failed to start the flow” error when importing dictionaries in SharePoint 2013 search

image
During a production deployment today we encountered the following error when running the Import-SPEnterpriseSearchCustomExtractionDictionary commandlet for a custom dictionary.

Importing \\dropserver\deployment$\Internal\dictionaries\site_types.csv to Microsoft.UserDictionaries.EntityExtraction.Custom.WordPart.3
Import-SPEnterpriseSearchCustomExtractionDictionary : Failed to start the flow: Microsoft.CXDDeploymentCaseInSensitive

There were no apparent reason for this and if it had been a test environment we would have just re-started the Search Host Controller service on all machines and hope that it fixed it. As we were in production that was not an option.

Tuesday, August 25, 2015

Delve blog articles dissected

image
Kanwal Khipple had a question on the Office 365 Yammer network the other day about how can you surface Delve blog articles on a SharePoint site?

To figure out if it’s doable and how you need to understand how the Delve article solution is built. I won’t go into the actual digging, but rather lay out the building blocks from a technical perspective.
And if you want the short story, surfacing metadata other than Title and Author is not trivial – from a search perspective. Which is also what you see in a Delve card.

image

Wednesday, August 19, 2015

How to do case-insensitive sorting in SharePoint search

Short answer, you can’t.

image

If you’re working on-premises, read on for the longer answer. If you’re working in SharePoint Online, take a deep breath, sigh, and log a support ticket so we can get this into the product.

Tuesday, August 18, 2015

Changing JSON properties in an XML file–or edit DataProviderJSON in a search web part using C#

I have previously posted how to use PowerShell to change properties for a search result web part (Make sure your people search is fuzzified)

My colleague Tarjei (@tarjeieo) is working on some templating for a provisioning engine using CSOM and he needed to change some values in a web part file before loading it into a page. This involves both XML parsing with namespaces and making sure you don’t cripple the JSON object you are changing.

Here’s the code I ended up with to modify the SourceName property for a search result web part file, ignoring the namespaces in the xml file.

XElement doc = XElement.Load(@"D:\Temp\test.webpart");
var element = doc.XPathSelectElement(".//*[local-name() = 'property' and @name='DataProviderJSON']");
dynamic dp = JObject.Parse(element.Value);
dp.SourceName = "lala";
element.Value = JObject.FromObject(dp).ToString();
doc.Save(@"D:\Temp\test.webpart2");

Saturday, August 8, 2015

Fall Speaking Schedule– Modern Workplace Summit, SPS Münich and SPS Oslo

speaking_at_o365

8-9 September sports the Model Workplace Summit hosted in Oslo with tracks on Office 365, Skype for business, Windows 10 and business productivity, and I’m delighted to announce that I was chosen to speak at the first Modern Workplace Summit ever.

If you need to create a strategy for collaboration, cloud, migration, or how to increase end user adoption then this is the conference for you to participate. Take a look at the impressive speaker line-up, and even more impressive agenda with over 50 sessions for you to choose from. Register at http://mwssummit.com/registration/.

My session is titled Office 365, SharePoint Online, SharePoint On-premises - The Hybrid story and beyond, and in the session I will discuss the hybrid story so far, and the road ahead from Microsoft. I will weigh pro's and con's about being on-premises only, online only, or maybe hybrid can be the winning solution?

image

October 10th I’ll travel to attend the inaugural SPS Münich. The conference is organized by my good friend Matthias Einig and I’m honored to be asked to speak. I will do my Search Queries Explained talk based on my blog post series and book, as it seems to be a topic never exhausted and a topic dear to my heart.

SPS Oslo

October 17th it’s my home town of Oslo which will have it’s third SharePoint Saturday. I was part of organizing the first two, but the event is in good hands!

In Oslo I’ll talk about Office Graph - Is it for you and your business? where I will go into what the Office Graph is and how it can play an important part for information retrieval and insights in your business.

Hope to see you at any of these three events and they should all be pretty fun and interesting!

Sunday, August 2, 2015

Importing managed properties and search settings to your SharePoint Online tenant is dead easy!

The crux to get this working is to set the client context to your sharepoint admin site and use the SPSiteSubscription level for your import.

string adminUrl = "https://delve-admin.sharepoint.com";
using (var context = new ClientContext(adminUrl))
{
    context.Credentials = new SharePointOnlineCredentials(userName, securePassword);
    SearchConfigurationPortability searchConfig = new SearchConfigurationPortability(context);
    SearchObjectOwner owner = new SearchObjectOwner(context, SearchObjectLevel.SPSiteSubscription);
    string xml = System.IO.File.ReadAllText("SearchConfiguration.xml");
    searchConfig.ImportSearchConfiguration(owner, xml);
    context.ExecuteQuery();
}

If you are using OfficePnP then you get away with the following snippet

string adminUrl = "https://delve-admin.sharepoint.com";
using (var context = new ClientContext(adminUrl))
{
    context.Credentials = new SharePointOnlineCredentials(userName, securePassword);
    context.ImportSearchSettings("SearchConfiguration.xml", SearchObjectLevel.SPSiteSubscription);
}