Max Melcher

4 minute read

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)

  1. Add some columns with values to a list
  2. Full crawl
  3. Create a Managed Property with the corresponding mapping
  4. Full Crawl
  5. Drop a Search WebPart (Search Result WebPart, Content By Search or one of the other options)
  6. 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:

  1. Are the items in the index already?
  2. Can you see it / who can see it?
  3. What properties are available for those items?
  4. Are the properties available on all items?
  5. How often do the items change?
  6. Ranking? Why is that item higher ranked?
  7. What should be visualized and how?
  8. 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:

 

Search Query Tool 2.2

Search Query Tool 2.2

  1. REST URL with all selected parameters – awesome to create JavaScript apps or apps outside of SharePoint
  2. 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.
  3. Result Tabs – you get all the results here:

    1. Status: How many results (with and without duplicates) where delivered in what time.
    2. Raw: Unformatted JSON results (ugly, most of the time I skip that tab) – response headers are sometimes interesting in the case of an error.
    3. Primary Results: 99% of the time I am in this tab.

      Primary Results - shows the standard and selected properties

      Primary Results – shows the default or the Select Properties

      • 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.

        What refiners would you get for the current query?

        What refiners would you get for the current query?

        • Secondary Results: Skipping that most of the times, kinda useless IMHO.
        • Suggestion Results: You have to use a suggestion query for that.

          Share suggests SharePoint

          Share suggests SharePoint

           

          • Debug – I cover that in a future blog post.

  4. All connection options. Very useful to test search with different accounts. You can save the connection information via the menu File >> Save Connection Properties.

  5. The advanced options. I always enable the experimental features!

    1. They enable a preview in the tool for supported files (office and web pages)

      Preview for supported files (OWA is a requirement)

      Preview for supported files (OWA is a requirement)

      • And most importantly it adds the button that I use most of the time: View all Properties

        The "magic" view all properties link

        The “magic” view all properties link

        The dialog showing all available properties

        The dialog showing all available 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.

Final words

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.

comments powered by Disqus