SharePoint Search Query Tool

Using SharePoint Search Query Tool

If you’re working on SharePoint deployments, and aren’t familiar with SharePoint Search Query Tool, you’re probably doing something wrong. Or you’ve gotten a really troublefree tenant and simple requirements.. 🙂 At least for technical issues, it’s the #1 tool for debugging what’s in the index and what isn’t. This blog post describes how to use it to investigate SharePoint Online Search index issues.

This blog post is about using SharePoint Search Query Tool to investigate search index issues in SharePoint Online. First of all, you can get the tool from here: https://sp2013searchtool.codeplex.com/.

Contents

 

Logging in to strange or difficult SharePoint Online sites

If you’re like me, you have a lot of different customers/partners/friends or family, who all have different tenants and use different authentication methods. The tool does support logging in with pretty much any user account you might have on your hands, but sometimes messes up with federation or caching the credentials.

However, for the SharePoint Online site login the application seems to use internal browser login dialogue, which remembers and caches your earlier credentials, which might be sometimes tricky, because it might make it difficult to use the credentials you should be using.

SharePoint Search Query Tool login options
SharePoint Search Query Tool login options

Clicking this link opens up a login dialog, and depending on the type of the site and your last login, you may or may not see the option to change the account. In the screenshot below I actually could use a cloud login… But the description text was blocking the option to change accounts! Pretty annoying, eh? 

SharePoint Search Query Tool login popup
SharePoint Search Query Tool login popup

Well, that’s just plain annoying!

Even when there’s no option to use another account or authentication is redirected directly to login screen (probably happens with some ADFS scenarios), it’s possible to change the site against which you’re authenticating with the following trick. The logic screen is technically an internal browser, right? It actually works as one, too. Press CTRL+L, and it’ll open you Internet Explorer’s “open”-popup – which accepts urls!

8h5Tuib[1]SharePoint Search Query Tool login popup with Internet Explorer Open-dialog
SharePoint Search Query Tool login popup with Internet Explorer Open-dialog

On that textbox you can just write “https://login.microsoftonline.com/” and it’ll redirect you to cloud login (so you won’t be forced to the ADFS login). Pretty cool, huh?

Fetching all Managed Properties

To be able to view all managed properties from the items in the search index, add this text to your Refiners -textbox:

managedproperties(filter=600/0/*)

Other points and tips

As always, remember to disable “Trim Duplicates” by unchecking the checkbox under “Query Text” textarea. When has that functionality actually served it’s purpose, anyway?

SharePoint Search Query Tool - Trim Duplicates disabled
SharePoint Search Query Tool – Trim Duplicates disabled

Awesome resources

The following two tabs change content below.

Antti K. Koskela

Solutions Architect / Escalations Engineer at Koskila / Norppandalotti Software / Valo Solutions
Antti Koskela is a proud digital native nomadic millenial full stack developer (is that enough funny buzzwords? That's definitely enough funny buzzwords!), who works as a Solutions Architect for Valo Intranet, the product that will make you fall in love with your intranet. Working with the global partner network, he's responsible for the success of Valo deployments happening all around the world. He's been a developer from 2004 (starting with PHP and Java), and he's been bending and twisting SharePoint into different shapes since MOSS. Nowadays he's not only working on SharePoint, but also on .NET projects, Azure, Office 365 and a lot of other stuff. This is his personal professional (e.g. professional, but definitely personal) blog.

Let me know your thoughts!