Creating Search Driven Applications is very easy with SharePoint 2013 – sometimes.
For a really simple example you need 6 steps for SharePoint content (read detailed article here)
- Add some columns with values to a list
- Full crawl
- Create a Managed Property with the corresponding mapping
- Full Crawl
- Drop a Search WebPart (Search Result WebPart, Content By Search or one of the other options)
- Create a query that fits your needs
Bam! Easy, performant solution* and almost maintenance free (*depends on your query).
So? Where is/are the Problem(s)?
Most of the time its a challenge to create the search query (read this: Search Queries explained, 12 parts!) – for the most queries you need to understand what properties you have and can use to answer the business needs. For that you always have the same challenges:
- Are the items in the index already?
- Can you see it / who can see it?
- What properties are available for those items?
- Are the properties available on all items?
- How often do the items change?
- Ranking? Why is that item higher ranked?
- What should be visualized and how?
- Does my query work (at all)?
And of course many more.
So how to tackle some/all of the problems? Search Query Tool to the rescue!
First of all, there is one tool that gives you a head start: Search Query Tool for SharePoint 2013 (free, codeplex). It is so nice, I had to contribute some time and love, too.
In the following I will show some of the main features of it that help me almost daily:
- Query Options – so many and really interesting options. You don’t want Phonetic Queries? There are plenty of different options here, almost all have a descriptive tooltip. Some of the fields have a tiny box right to a textbox, click on it for some useful default values. Quite handy if you don’t know how to put values in.
Result Tabs – you get all the results here:
- Status: How many results (with and without duplicates) where delivered in what time.
- Raw: Unformatted JSON results (ugly, most of the time I skip that tab) – response headers are sometimes interesting in the case of an error.
Primary Results: 99% of the time I am in this tab.
Refinement Results: What refiners do you get with the current query. You have to use the Refiners box in the Query Options (2) to see some results.
- Secondary Results: Skipping that most of the times, kinda useless IMHO.
Suggestion Results: You have to use a suggestion query for that.
Debug – I cover that in a future blog post.
All connection options. Very useful to test search with different accounts. You can save the connection information via the menu File >> Save Connection Properties.
The advanced options. I always enable the experimental features!
They enable a preview in the tool for supported files (office and web pages)
And most importantly it adds the button that I use most of the time: View all Properties
The dialog shows all Managed Properties of the selected it. For that it needs the Property Workid, so make sure its in the Select Properties field (otherwise the tool will yell at you!).
There are differences for SharePoint Online – maybe they will patch it so on-prem faces the same challenge. But once again Mikael Svenson has a solution for that.
Quite a lot of features for a FREE tool – but for Search challenges it’s really essential. Did I notice it has a freshness boost generator? Or did I mention that it supports the Office Graph Language (GQL), too?
Can you solve all problems with it? I hope so – if not, please drop me a comment or directly on the discussion page.