Tuesday, February 2, 2016

"I Want to Believe" - Is Microsoft abandoning the enterprise features of enterprise search?

image
I want to believe that Microsoft has not abandoned the enterprise in enterprise search, and that the good people behind the FAST seearch engine still are allowed to deliver well tested and proven features around the SharePoint search space.

If features are removed, as they were from FAST ESP to FAST Search 2010 from SharePoint, and from FAST Search 2010 for SharePoint to SharePoint 2013, then remove them first after you have tried to advocate the use of them. Just because a feature is not used by the average SharePoint consultant/pro-user, does not mean it’s not valuable. It might be that they just don’t know about it, or don’t know how to put it to good use.

Want to read more? Head over to ITUnity for the full article.

Friday, January 22, 2016

Do something after all refiners templates have completed rendering

image
Elio Struyf is a good friend and did a post today which I have shamelessly copied my post title from. Elio missed an approach on how to run code once all refiners (or other search part) has been rendered, so I figured I’d help him out :-)

Be sure to read Elio’s excellent post before you continue!

Wednesday, January 20, 2016

Find people based on taxonomy id’s

image
The typical scenario shown and used is where you want to list content relevant to a user based on a property on the content and a property on the user profile. For example the Ask Me About property for a user will by default store the terms as enterprise keywords. This means that if you want to list content with enterprise keywords enabled for the current user you can use a query template like:

{|owsTaxIdTaxKeyword:{User.SPS-Responsibility.Id}}

What if you want to list all people tagged with taxonomy values from a page?

Now we have the exact opposite scenario.

{|AskMeAbout:{Item.TaxKeyword} will work, as it uses the labels and not the id’s. However {|AskMeAbout:{Item.TaxKeyword.Id} will not work as the AskMeAbout field only has labels and not id’s. If you have terms with the same label in different hierarchies, or labels which can be sub-strings of other labels, then this very quickly breaks.

Is there a solution? Of course!

Here’s the magic you need to know. When you have a user profile property tied to a taxonomy, you will get a crawled property named ows_taxid_SPShPropertyName for SPS- prefixed properties and ows_taxid_PropertyName for other ones, with corresponding managed properties named owstaxIdSPShPropertyName / owstaxIdPropertyName. Just like you get for taxonomy based site columns for content.

Switch the query over to: {|owstaxIdSPShResponsibility:{Item.TaxKeyword.Id} and you’re all set. (SPS-Responsibility is the internal name for the user profile property Ask me about.)

image

The main difference for taxonomy based user profile properties is that the managed property only contains the id’s, not the labels, but it does include the property with and without the #0 prefix as well as the termset id.

image

Note: The user profile property has to be visible to everyone and marked as indexeable for it show in search.

How I watch movies without disturbing my wife and kid

image

I’ve been known to like action movies, and in particular what we in Norwegian call “gla’vold” – think Tarantino style, or even Toxing Avenger (can’t discriminate on the genre and quality). These movies work best with a certain volume turned up. As I live in an apartment, it’s out of the question to crank up the volume unless I’m home by myself, because my wife and kid would be seriously annoyed. For years now this has declined my consumption of movies, and when I have self-time I need to choose between coding on some pet project or watch a movie.

Disclaimer: I'm no audiophile, and sound over bluetooth will never be the same quality as if you use a cable since audio is lossy compressed. But who cares when we talk about gadgets :)

Not any more!

A while ago I bought a pair of Nokia Purity BH-940 by Monster bluetooth headphones based on a review by Scott Hanselman. I mainly bought them to act as office headphones serving music and also to by used for Skype calls. As they are noice cancel headphones, they also work for plane rides. Except the review does not mention that bluetooth has a flaw when it comes to audio sound on calls when you use the microphone. The quality is plain and simple crap. 

This has nothing to do with the BH-940’s, but the bluetooth protocol. Listening to music only with my Surface 3 Pro was no problem, but calls not so much. I have now replaced the BH-940’s for Bose QC20’s (earbuds) which I won and hence free, and also a cheap USB headset for talks. Which means the BH-940’s has been sitting in a cupboard for a while. Not sure I would recommend the BH-940's myself, but I happened to have them handy.

One evening surfing the net I came accross the Tosblue X from Telme2 ($69) which can take an optical signal via toslink or a 3.5mm mini-jack, and send it out over bluetooth. I googled a bit on reviews and placed my order.

With the Tosblue X in place my current setup is now optical audio out from my Samsung Smart TV, into a toslink splitter, where one goes to my soundbar/subwoofer and the other to the Tosblue X.

Pairing was super simple, and delay was not noticable to me, so no need to worry about lip sync. I’ve tried a couple of movies now via Netflix and the audio is back! Also tried them listening to a slalom sports broadcast, and the audio detail via the headphones was so much better than the soundbar. Suddenly I picked up all turns and snowsounds as well as some distant chainsaw.

The problem now is that I want to wear them any time I watch TV – which does not sit well with other people in the same room :)

So if you're in need of audio at night without cables, this solution might be a fit.

Tuesday, January 19, 2016

Creating crawl rules for SharePoint search with persistant cookies using PowerShell

image

There are numerous posts out there on how to programatically create a cookie based crawl rule which will first login at a specific URL, and then use the cookies recived when crawling the content source. This is however the first one on how to do a persistant one.

Here’s a brief sample:

$ssa = Get-SPEnterpriseSearchServiceApplication
#Create rule
$rule = New-SPEnterpriseSearchCrawlRule -SearchApplication $ssa -Path 'http://*.contoso.com/*' -Type InclusionRule -FollowComplexUrls $true -AuthenticationType CookieRuleAccess
#Add cookie information
$authUrl = "http://www.contoso.com/auth?username=foo&password=bar"
$rule.SetCredentials([Microsoft.Office.Server.Search.Administration.CrawlRuleAuthenticationType]::CookieRuleAccess,"pzl", $authUrl)

The above code will before each crawl call the url from $authUrl to get the cookie. The cookie added above with “Pzl” is just a dummy cookie for making the command work.

Wednesday, January 13, 2016

Getting diacrits to work with thesaurus in SharePoint search

When you live in Europe you tend to decorate the English a-z letters every so often. If you don’t know what I mean here’s some examples:

ö å ï é à

The important part when you create your thesaurus csv file as mention on TechNet is to save this file in UTF-8 format for it to work. And also do it without BOM/Ssgnature to be super sure.

In Notepad++ you find the setting under Encoding

image

In Visual Studio you pick Save As, then click the arrow on the Save button, pick Save with Encoding…and pick Unicode (UTF-8 without signature) – Codepage 65001 as your encoding.

image

image

The same goes for any other character set as well – stick with UTF-8 without signature.

Happy synonyming, and thanks for Elio Struyf for asking me this question!

Tuesday, January 12, 2016

How to filter out BCS top level entities in search

imageProblem

When indexing BCS sources in SharePoint you get two extra top level entries which are not actual data rows. These rows are also searchable by anyone and will appear as noise in your search results unless you filter them away – typically a problem when doing wildcard searches.

Solution

When you index BCS entitiy models. SharePoint adds a hidden managed property named entityname to the search schema. This managed property contains the name of the BCS entity being indexed, and is not set for the toplevel BCS items. Hence you can add a filter of entityname:modelname to make sure you filter on exactly what you want, instead of filtering on contentsource.

Thursday, December 31, 2015

A quick look back at 2015 – and what lies ahead in 2016

I thought I’d for once take a look at which of my posts for the past year has been views the most. Here’s a pick of five out of the 70 I managed to write – and thanks to all who appreciate me doing this!
In addition to writing posts I also spoke at a few events, most notably Microsoft Ignite, which also was the most fun event in a way. I’m the “Battle of the graph” session was the only one at Ignite without a single slide, and the only one where a dude on stage was wearing a black hooded cape (me). But I did manage to get CollaboGraph app out of it.

So what’s next for 2016? Blogging wise we’ll see, but doing search relevance tuning seems like a topic. Speaking wise my only plan is to say something at the Arctic SharePoint Challenge in February, which I’m part of organizing. But I’m sure something pops up.

As for Office 365 and SharePoint I think it’s moving in the right direction, and the end of the year yielded some good discussions with fellow MVP’s at the MVP summit. Mix that with recent posts by Microsoft and I’m sure 2016 will be awesome.

At the end of the year Puzzlepart was bought by Crayon, certainly an opportunity for creating something interesting in the Office 365 space. Hopefully Puzzlepart’s and my own enthusiasm will rub off for some customers out there :-)

Wednesday, December 9, 2015

My stance on modifying the out of the box display templates

image
My colleague Petter had a request from a customer to open search results in a new window/tab instead of the same one. So he conferred the braintrust at Puzzlepart on which approach he should go for.

One answers was to modify the control template and loop though all links using JavaScript and add the target=”_blank” attribute. Another to hook in a custom action to which registered a javascript which filtered on click events and did the same modification sort of.

Personally I went against what I always preach which is to never modify the OOB display templates. The customer in this case was using the oob templates, and all the oob item templates through inception reference Item_CommonItem_Body.html/js. We’re talking around 30 result types, referencing some oob template which again reference Item_CommonItem_Body.

To me modifying one line in that file to open the item in a new tab/window had the least complexity. Creating or modifying a custom control template would possibly have required reconfiguration of X pages in the search center. The custom action would have solved it all, but a solution hidden away of sorts.

When is it not ok to modify the OOB templates then?

Most modifications I come across involve adding a new managed property into the template to be displayed. Try this with an OOB template and you fail pure and simple. It just doesn’t work as you won’t be able to Update the result type binding to include your custom managed properties. For this scenario you must create a copy and tie it to your own result type.

And this is where we usually start at Puzzlepart. We have custom templates from the get-go and ready configurations for the 30 result types to be replaced. Petter’s customer already had a search solution up and running when he came in to make it rock, but rolling new display templates were not in scope.

So…. should you or should you not modify the OOB display templates? As a general rule, don’t do it, but if you know what you are doing and know the reasons why, there are scenarios which justify this. Another is to edit the default refiner template and turn on refiner counts.

And as my colleague Tarjei pointed out, if you do change the oob ones, remember that you might miss out on some awesome cool changes coming in a CU near you... or not ;-) - the reason being you have ghosted the files so it won't use possible awesomeness deployed in the 15 hive - or not ;-)

Monday, December 7, 2015

FindTime–A really awesome schedule plugin for Outlook

Microsoft has an internal initiative named Microsoft Garage projects where employees from all over Microsoft turn great ideas into real projects. One of the most recent projects to come out of this initiative is called FindTime, announced on the Office blog, an Outlook plugin which lets you schedule meetings with colleagues – but with polling functionality like Doodle. Or much like the Sunrise app on the iPhone. The FindTime add-in works with Outlook 2013, Outlook 2016 and with Outlook Web Access.

It’s real simple. Start a new e-mail, add people to the To or Cc fields, and you will see their availability in the plugin. In the image below you see I have chosen three possible time slots for a 30 minute meeting with my colleagues, Mads, Elsa and Thomas.

image