Monday, December 22, 2014

Video Portal Troubleshooting

A new release without issues hard to achieve and Office 365 Video is no exception. I will explain a couple of typical scenarios which you might encounter.

  • A channel with that name already exists
  • I have renamed my channel, but the channel name is still listed with the old one on the channel listing page

Wednesday, December 17, 2014

S15E11: FAST Query Language (FQL) – The Unwanted Step Son

This is the eleventh episode in my series “SharePoint Search Queries Explained - The Series”. See the intro post for links to all episodes.

In the first two episodes of the series I covered KQL and a couple of the new operators introduced with SharePoint 2013 which came from FQL - XRANK, NEAR and ONEAR.
In addition FQL has even more operators, some of them listed below:
  • starts-with
  • ends-width
  • count
  • andnot
  • range
There are also other operators which gives you great control over how a query is being sent over and parsed, and I recommend reading over the samples at FAST Query Language (FQL) syntax reference.

The post title plays at the fact that FQL is sort of hidden away, and no one really talks about it while the underlying search engine (and the refiner UI) in SharePoint (still) uses FQL.

This means KQL statements are translated to FQL before being executed. If this will hold true forever no one knows, but probably until that part of the search engine is being rewritten at some point – and this is good news as FQL has some tricks up it sleeve compared to the polished KQL counterpart.

Monday, December 15, 2014

Irregular gathering of crawled properties with SharePoint web crawls

To pick up data from <meta> tags when crawling web pages:

  • Make sure the crawled markup has line breaks after tags
  • Look in both Web and Document Parser crawled property categories for your crawled properties
  • Register the file extension crawled as the right mime type
  • Add the file extension crawled as the supported File Types

image

Thursday, December 11, 2014

How to trigger re-indexing of user profiles in SharePoint On-line

You asked for it, and I deliver an early Xmas present for your pleasure and enjoyment!https://github.com/wobba/SPO-Trigger-Reindex

This script was made possible by the September 3rd release of the CSOM SDK which implements user profile write support. And DO NOT run it from a SharePoint Online Management Powershell, use a regular Powershell with no special cmdlets loaded. If not you get CSOM DLL hell.

Problem: You map an existing (or new) crawled property corresponding to a user profile property to a new managed property you want to use in search (phew). After the mapping, you wait and you wait and you wait (as you cannot start a full crawl yourself in SPO)… and you never get a value in your managed property. You curse some, you Google some, you post some questions in forums or Yammer. Then you go and edit your user profile in the SPO UI, wait some more.. and voila the value is there. You’re seriously baffled at the randomness and think to yourself

How the can I ask my 5,000 users to go edit their user profile to get that new property working in search??

(don’t worry - my script will help you out!)

Monday, December 8, 2014

The right robots.txt settings for allowing SharePoint to crawl your site

If you want you want to allow SharePoint 2010 or 2013 to crawl your web site add the following to your robots.txt file.

User-agent: MS Search 6.0 Robot
Disallow:

Even though the crawler sends Mozilla/4.0 (compatible; MSIE 4.01; Windows NT; MS Search 6.0 Robot) as the user agent string, this is not what you should check against. Logical…. nah, but it is what it is.

Total cost to figure this out: 6h Sad smile

Reference: The SharePoint Server crawler ignored directives in Robots.txt

Friday, December 5, 2014

Tip for working with / troubleshooting search configurations in a production environment

I’m currently involved in a project where we have the typical DEV, TEST, STAGE, PRODUCTION way of deploying. Access wise you can typically view them like this:

DEV God rights!
TEST Demi-God rights!
STAGE Scream over the fence rights!
PRODUCTION Low life employee rights!

So, you’ve created your documentation and deployment packages, gone through all environments and finally handed them over to the PRODUCTION GOD. Hopefully all your meticulous steps have been followed, but alas, something is not working! SHOCKER! <insert scream here>

You have no way to examine configurations, as you can only search as yourself and have view rights.

In SharePoint 2010 you had to go to the SSA in order to view configuration, which was and still is very much hands-off unless you’re sitting in the same room or sharing a screen with the PRODUCTION GOD. In SharePoint 2013 Microsoft came up with this interesting concept that you could change the search settings not only on the SSA level, but on tenant, site collection and site level as well. From the PRODUCTION GOD’s point of view this is still evil as you need site owner rights to view search configurations, and you could potentially quick-fix stuff without them ever knowing – GOD FORBID ;-)

So I came up with this super duper awesome amazing solution which was approved by the powers that be.

Note: Our search configuration is deployed either to the SSA or the Site Collection level, as the search site is hosted at https://search.company.com. No site level configurations.

What I managed to pull off was for them to create a sub-site (any template really) with broken inheritance, where I was added as site owner. The site is also marked not to be indexed to avoid it showing up as a site hit. This effectively allows my regular account to go to that sub-site and view all inherited search configurations on schema, query rules, result sources and result types. If I tried to do a modification on this sub-site it wouldn’t matter at all, as I’m at a lower level than the production site, only messing up locally for that sub-site.

I am now able to troubleshoot and at check the configuration to make a more educated guess as to what the error might be before I engage with PRODUCTION GOD to fix matters.

First fix from this? I discovered some crawled and managed properties was not mapped causing a refiner to not show up – and it ended up being a step missing in the deployment documentation.

Wednesday, November 19, 2014

Black Market GUID’s

image

I’m currently sitting in the speaker room for SharePoint Connect 2014 in Amsterdam and somehow we got into talking about GUID’s. If you scour the interwebs you will find numerous sites offering to generate a unique GUID for you. There is even fraud sites where you can register and reserve GUID’s.

But what I did learn is that if you really want a truly unique GUID, one to keep and use all to yourself, one which will trump any other equal GUID held by someone else, then you have to go to the BLACK MARKET.

In every major city there are people dealing with black market GUID’s. They are truly unique and apparently of great quality. They have even survived the recent economic crises without so much as a dent or lost bit. I was lucky enough to buy one for my last euro’s second hand at the conference, and if everything goes my way I was told I will get the number for a local dealer in Oslo -  so as to scratch my daily needs for fresh GUID’s.

Unfortunately I cannot reveal the identity of the person selling it to me – but seems these black market dealers show up at larger conferences to hook more consumers of GUID’s.

Tuesday, November 18, 2014

Office Video is Live

Office Video just went live today November 11th, 2014. First they launched the Delve portal, now the Office 365 Video portal. Both driven by search. What’s next?

Getting-Started-1.jpg

I have had the fortune to test out the preview and have with my colleague Andreas written a guide to get you started planning this new awesome feature. Head over to Getting started with Office 365 Video to read all about it and also check out Office 365 Video Explained for some good insight into the platform.

Also check the official blog post for an introduction.

Tuesday, November 11, 2014

Tired of getting AllItems.aspx hits in your results?

If you append -contentclass:STS_List_* to your query template, they will all be excluded. In effect all list landing pages will be removed including:

  • AllItems.aspx
  • AllPages.aspx
  • AllPosts.aspx
  • AllCategories.aspx
  • Calendar.aspx
  • Overview.aspx

If you want to find all types excluded use the SharePoint 2013 Query Tool from Codeplex and issue the following query.

  • Row limit: 100 (or some high number)
  • Query Text: contentclass:STS_List_*
  • Collapse Spec: contentclass

The collapse specification ensures you only get one result per unique value.

Monday, November 10, 2014

How to: Make sure User Profile properties are free/full-text searchable

You get a requirement to add a new property called FavoriteColor to the user profile application, which you want searchable on the people search page. You create it, you fill it in, you wait for a crawl so that the crawled property People:FavoriteColor shows up, you create a new managed property named FavoriteColor, map your crawled property to it, fire off a full crawl for people, head over to people search page and type your favorite color.

Nothing shows!

However, if you type FavoriteColor:color, you get results.

I’ve gotten this question four or five times now, so thought I’d write it up.

The solution is as hard as it is easy. When you create a new managed property, it is by default added to the Default full-text index, not the PeopleIdx full-text index. The full text-index is what is used when you perform a free text query (as apposed to a property query). When querying for people you have to make sure your managed property is in the PeopleIdx.

On the managed property settings page, click the  Advanced Searchable Settings button, and pick PeopleIdx from the dropdown.

image

Next up perform a new full-crawl of the UPA, and it should all work!

If you are curious what the FullTextIndex1/2/3 are, just stay away from them and don’t give it a second thought. They could in theory be useful, but when moving from FAST Search for SharePoint to 2013, some query logic was forgotten, so they are all but useless (known issue by the product team, and a ticket has been filed and archived). I might do a write up on that later – but not too many would be interested in it.