For as long as I have been doing SharePoint, figuring out what properties to use when filtering or displaying search results in regards to people has been a challenge as the documentation in this space is somewhat lacking. I’m not sure why I haven’t done this writeup earlier, but no time like the present.
Thursday, January 11, 2024
Monday, September 14, 2020
Microsoft Search vs. PnP Modern Search – a clash of titans!
Sorry for the clickbait title. I have been meaning to write about how I think about the out-of-the-box Microsoft Search vs. the PnP Modern Search web parts for a while, so here goes.
Disclaimer: I have been working with search for 20 years, enterprise search for 15 years and SharePoint and search for almost just as long. The opinions stated are my own and they are based on my experience with search in FAST ESP, SharePoint and Office 365 over the years and are not influenced by my role as a program manager on Microsoft Search. No money or breaking of fingers were involved in writing this post :)
A little history
With SharePoint 2013, Microsoft shipped many ways to customize how search worked. Both from a technical and user experience perspective. The more important one being the ability to use arbitrary HTML, CSS, and JavaScript in custom display templates with the Search Result web part and the Content by Search web part (CSWP).
Fast forward to SharePoint Online and the release of modern SharePoint pages late 2016. Modern pages came with a new set of web parts and lacked the super-flexible CSWP. Modern pages did introduce the Highlighted Content web part (HCWP), positioned as “...the newer, simplified version of the Content Search web part.”
When customer transitioned from classic to modern a gap had been formed between the CSWP and the HCWP which needed filling. And this is where the awesome sharing in the SharePoint community comes in, put into a sharable system with Microsoft 365 Patterns and Practices (PnP).
The first version of the PnP Modern Search web parts (MSWP) were added as a SharePoint Framework sample by Franck Cornu back in October of 2017. My first contribution to the sample was made in January of 2018 to include additions needed for a customer project I had at the time.
Back then MSWP was one web part; the result web part which included an optional built-in refinement panel. The search box web part got introduced late February of 2018, with the vertical web part following later. My main reason for looking at the sample web part in the first place was the need of a roll-up web part for a project. The Highlighted Content web part (HCWP) lacked the needed templating required – and still does, and why bother develop something if it already exists? Much easier to add to a maintained code base compared to owning it completely on my own #lazyprogrammer.
Image by Zhang Kenny @ Unsplash.
And this is where I believe the PnP Modern Search web parts has its sweet spot – bridge the gap between the classic Content by Search web part and the new Highlighted Content web part. This was my opinion back in 2018, and it still is in 2020. I actually formed the opinion back in 2016. That is 4 years and counting.
Why? you might wonder.
The modern search page was soft launched as part of the SharePoint Home page with the May 4th event in 2016. An out-of-the-box non-configurable search page. The page itself did have a link at the bottom which took you to the classic enterprise search center, but it was indeed the start of mainstreaming the search experience. Microsoft removed the link in March this year without anyone really noticing, which leads to think it was the right thing to do :)
When SharePoint Home launched in 2016, I figured it’s time to stop creating classic display templates. I have a long history creating display templates and you can download some open source ones I started to create back in 2014 from github.com/spcsr. I call this out to emphasize I have indeed customizeded search in the past and thought it a good idea at the time. With the introduction of SharePoint Home the journey for Microsoft Search was started – one experience to work on across desktop and mobile – I changed my mind.
At Ignite 2017 the vision for Microsoft Search as you see it today was launched and the search experience from SharePoint Home made its way over to office.com. Last year, in 2019, Microsoft Search in Bing followed suit. From a slow start, Microsoft Search is hitting more and more client endpoints with the promise of a coherent search experience. Same search box everywhere, with predictable results – all driven by the same Microsoft Search backend. And this will continue to expand going forward.
https://docs.microsoft.com/en-us/microsoftsearch/overview-microsoft-search
Let us go back again four years to 2016. I don’t think myself as very good at predicting the future, but this time I got it right. My take was, if I cannot control which search box people search from with no options to customize the result page they get to, why spend a lot of time and money to create something custom?
Sure, I have the ability and skills needed to tune search both from a relevance and UX perspective to be awesome for a specific business. I ended up thinking it is not worth spending the time or money. I would rather use my consulting hours on other fun and valuable projects. Did I have to fight customers and argue my point? YES!! Many had invested in custom search solution for classic SharePoint and wanted the solution brought over as part of their cloud journey. For those who have been privy to these customers conversations they know the following to be a common Mikael statement:
“If you believe you are right and really really want to create a custom search experience, feel free to do so, but you have to get another consultant to do so. It could be my colleague, but it won’t be me.”
Hindsight I hope they see that I was right and that their money was better spent elsewhere.
If you add the personalized relevance introduced in 2017 based on the Microsoft Graph (then Office Graph) to the equation, it’s just not worth competing with it. Too hard. To me anyways.
Four years after the inception of the Microsoft Search search experience, Microsoft is finally adding capabilities customization capabilities to the search result page. You can add your own verticals, add your own refiners and limit what is returned per vertical (roadmap item 57054). Why did it take so long to get customization functionality...? Well, I do not have all the history as I joined the Microsoft Search team in June 2019. One key part is that Microsoft need to ensure the experience works in multiple clients, not only SharePoint. Therefore some of the classic SharePoint constructs (which were awesome when launched for SharePoint 2013, and still are today in terms of architecture) have to yield as Microsoft Search encompasses multiple clients and content. At the same time as classic search is being left behind I do believe we are also innovating with similar, better and certainly more cloud forward solutions from a technical perspective.
“If you’re so PRO Microsoft Search, why do you then work on, manage and promote PnP Modern Search?”
The answer is simple. Because I love to develop and I do believe PnP Modern Search has a good place in the eco-system for search driven apps, specific portal solutions, or for a more flexible roll-up web part in modern SharePoint pages. The portal/app scenario is available as a downloadable PnP provisioning template.
Did you see PnP Modern Search started to be mentioned on search roadmap slides in 2019? I might have had a finger to do here – and it is because Microsoft do see the value in providing full customization capabilities with search. For scenarios which really really really benefits from special technical and UX capabilities. SharePoint has always been a platform for those needing full flexibility, and it still is via the SharePoint Framework. For the majority of enterprise search needs I don’t believe this level of customization is needed.
Short term the PnP Modern Search web parts can potentially let someone create a better enterprise search center, and I know this happens, but it comes at the cost of educating your users to use a search box you control. An impossible task in my opinion, leading to a disconnected search experience for the end-user as users start their search journey from:
- SharePoint Home
- Office.com
- Teams
- Work, Excel, PowerPoint
- Outlook
- Windows 10
- The browser address bar
- Microsoft Search in Bing
- Web application
- Desktop application
- Mobile applications
- etc.
I honestly believe the out-of-the-box Microsoft Search experiences is the best way forward for most Microsoft 365 users out there, and Microsoft continues to strive to make it better. Not just for the majority of users, but also for the edge cases.
PS! I was about to lose faith in Microsoft Search back in January of 2019, but I’m back on track. Read my post The conspiracy is real! for more details.
If you believe me to be wrong and off my rocker I’m all ears for reasonable arguments to sway me over. Yes, I do acknowledge there are good reasons to control and customize enterprise search, but I find it hard to justify the investments vs. the outcome.
References:
Cover photo by Attentie Attentie @ Unsplash.
Monday, August 26, 2019
Classic vs Modern and More Microsoft Search Questions Answered
Over the past several weeks there has been a number of community questions on classic vs. modern search in relationship to SharePoint and Microsoft Search across social channels. We selected the most common questions and created a Q&A article over at the Microsoft Tech Community to help answer those.
If you have comments or questions, scoot over to Tech Community and let us know.
Sunday, June 2, 2019
The conspiracy is real!
In February of 2016 I wrote a post titled "I Want to Believe" - Is Microsoft abandoning the enterprise features of enterprise search? where I discuss how Microsoft seems to have abandoned enterprise search, but I still wanted to believe they had not.
Ever since I wrote that article over three years ago I have slowly been building up to write a follow-up – trying hard to find the right framing for my thoughts.
For those who know me, they know I haven’t spent particularly much time on search related work the past years. Why? I have just about only been working with Office 365 and SharePoint Online and tinkering too much with search online has seemed like a bad idea – especially after the launch of modern SharePoint in mid-2017. My advice to clients has been to not spend too much effort on configuring search and see where things are going in the platform as you cannot control much in terms of functionality and user interfaces.
And just as I was about to write my follow-up article in January of this year about having lost the faith, Kathrine Hammervold of Microsoft contacts me for our semi-random-annual coffee chat on “the state of search”. This has typically been an informal chat where I get to give my feedback from the customer/consulting side of search. Except, I was not let in on the new agenda.
![]() |
My very own Microsoft Search t-shirt and shoe laces! |
From what she told me over coffee I was very much intrigued on “the state of Microsoft Search” and my spirits instantly rose. Maybe I could help form the future and have an impact?
I have been with Puzzlepart since 2011 and I so love my job and my freedom. I had no intention of switching jobs what so ever that Tuesday afternoon, but after much thought and discussions with great friends in and outside of Microsoft I decided I had nothing to lose and everything to gain.
Monday June 3rd I’ll be starting my new adventure in a new office, working with many of the people I already know inside of Microsoft as well as get to know a lot of new smart people. Quitting Puzzlepart was certainly not easy and has been a tough choice emotionally. It’s by far the best place I have ever worked and these past 8 years have just flown by. I love the people, I love the work, and I love Puzzlepart’s approach to clients and projects – it’s possibly one of the best Office 365 consultancies to work for. Everyone matters and everyone has the ability to shape their future and to be heard - but be prepared to juggle two to three clients at any one time (cheaper for the client, for fun for you :) And if you follow my blog you know Puzzlepart share a lot of the things they create for absolutely free on GitHub, as well as contribute to the Office 365 Patterns and Practices (PnP) work.
Which leads to: I honestly believe in Microsoft Search!, and that customers can get back some of the old flexibility we used to love in a modern way. In addition, modern AI driven features are constantly added to the mix, making search and search driven features even more ubiquitous than ever. It’s not about the tech, it’s about making the people who use the Microsoft platform even more efficient and innovative in their jobs.
“May the search be with you!”
Friday, January 4, 2019
Eh??? Ok? Be aware of a modern change which can impact your classical way of displaying search results
My colleague Tarald recently discovered that when looking at the managed property CreatedBy for modern pages where you have filled in the author byline, it will show the primary e-mail address, display name, and claims token for that user (and the claim includes the user principle name).
foo.bar@contoso.com | Bar, Foo | 693A30232E667C6D656D626572736869707C666F6F2E62617240636F6E746F736F2E636F6D i:0#.f|membership|foo.bar@contoso.com
Maybe not a big deal, but since forever, this managed property has contained only the display name of the user, nothing else. I’m not saying it’s a bad thing to give all the data as that disambiguates people with the same name, but what’s bad is changing default behavior which has been consistent for a long time.
The culprit to it all is that Microsoft has decided to map the crawled property ows_q_USER_AuthorByline as the first property when populating the managed property CreatedBy. The same mapping is done to the AuthorOWSUSER managed property, which is ok, as this property always had all data included.
The best option in my opinion is for Microsoft to remove this mapping, and create a new AuthorByLine managed property instead. That’s the way SharePoint developers have been taught to do when introducing new values. You can also change the mapping yourself, but that might mess up some oob web parts.
Friday, October 4, 2013
Search UI matters!
I’ve recently been tasked to optimize a search result page for a customer, as they have a “feeling” it’s not working out. For the record, I did not create the existing layout; if I did I would not write this post :)
The lesson to be learned is: Keep your UI clean, remove the clutter, and stick to science
I’ve long learned long ago that UX is very subjective and often emotionally loaded, and I do now want to force my views onto others without some backing. First off I got hold of the web server logs and wrote a small utility to parse out all the search queries going back a couple of months. By looking at the query strings I could easily pinpoint where in the UI people were clicking, thus providing me documented metrics on what parts of the current UI works, and which ones doesn’t.
Note: There is no out-of-the-box way of measuring where a user click in SP2010 or SP2013 search, so you have to figure out a way to do this yourself by either adding script and custom logging to the page, or parse the IIS logs as I did.
Saturday, February 26, 2011
Search Features vs. Security
Tuesday, November 30, 2010
Increasing the summary length in FS4SP
Friday, November 26, 2010
XSLT creation revisited for SharePoint 2010 Search and a small search tip
If you search with only a hash “#”, then you will do an empty search and all results are returned.
SharePoint 2010 has a section called “How to: View Search Results XML Data” which also existed for 2007. This time around it has included the important (obsolete for HTML5) XMP tag which makes rendering xml a breeze. Best practice is to use the PRE tag, but then you have to html encode your tags for it to render correctly.
Thursday, November 11, 2010
Why the Enterprise Search Web Parts are sealed
For non .Net programmers, a sealed web part means that you cannot inherit from it, doing your own customizations.
So, why are they really sealed?