Tabular Search Results with Column Filters

The customer I was with last week, like many others, wanted their search results to appear in a table form – like a List View, in fact.

List View Search Results

Now, I’ve written the XSL to do this for various solutions over the years, but they had found a CodePlex project for this – SharePoint 2010 Search Results in Tabular Format. This project has a feature I’d not managed to write, or had seen working before – column titles that were sortable and filterable:

Sorting and Filtering on Columns

That’s pretty neat. And it’s all XSL. You can, if you edit the XSL and the Columns you get back from search, show, sort, and filter other columns of data.

One observation I would make is that this XSL does not format Hit Highlighting – that is, matches aren’t shown as strong, and the summary doesn’t contain any ellipsises [ … ] characters. However, you could easily add these from the ‘standard’ XSL to get hit highlighting working again.

Advertisements
Tabular Search Results with Column Filters

Refinements panel and Custom Search Box web parts

So I’m doing some work for a customer where they want a custom Search Box web part. Essentially, they want to be able to search by particular managed properties, which is a pretty common scenario:

CaptureNaturally, I added this to my search results page, and removed the existing Search Box web part.

During test, the customer noticed that the ‘Show More’ links on the refinement panel had stopped working:

Capture2Interesting – although showing some different metadata properties, this was all pretty standard stuff. A bit of a check on Google found this interesting post by Chris Coulson. The short if it is that the Refinements panel uses JavaScript that is loaded by the Search Box web part – so you have to have a Search Box web part on the results page, even if it is hidden. Add that and the Refinement panel works again.

You can hide the web part via the web part properties > Layout > Hidden.

Refinements panel and Custom Search Box web parts

Annoying Navigation in Search Centers

I had two of my colleagues come to me with the same complaint – that the Basic Search Center site template in SharePoint 2010 doesn’t have any navigation to get ‘back’ to the rest of the site collection:

I pointed out to them that there are good reasons to consider having the Search Center separated from the rest of your content. I’d even suggest a separate Site Collection if using the Enterprise Search Center. (This uses the publishing features, and you might not want them turned on in your existing site collection).

However, my colleagues didn’t need all that, and really did just want a simple search center in the same site collection as their content. For example, a departmental site collection needed its own search center and search experience. But they’d really like users to be able to navigate back to the rest of the site collection.

So, I set forth to fix this dire state of affairs for them. Continue reading “Annoying Navigation in Search Centers”

Annoying Navigation in Search Centers

SharePoint Search – AuthzInitializeContextFromSid failed

I’d a really, really weird problem with a customer yesterday. We’d set up their SharePoint search. Indexing seemed to be working correctly, and when I logged in as an administrator, I was getting search results correctly. However, logged in as a normal – though very highly privileged – user my search results were missing! This was some thing of a surprise. It felt like security trimming, but the user was a Site Collection admin, and had Full Control throughout the entire main content web application. Also, we were indexing content off the network file share, and we knew he could access both the SharePoint Content.

However, when he ran a search, he didn’t get any search results. That sucked. I tried another user account – and had the same problem.

Eventually, I looked in the logs and found the following message:

AuthzInitializeContextFromSid failed with ERROR_ACCESS_DENIED. This error indicates that the account under which this process is executing may not have read access to the tokenGroupsGlobalAndUniversal attribute on the querying user’s Active Directory object. Query results which require non-Claims Windows authorization will not be returned to this querying user.

Continue reading “SharePoint Search – AuthzInitializeContextFromSid failed”

SharePoint Search – AuthzInitializeContextFromSid failed