https://gds.blog.gov.uk/2013/06/11/improving-site-search-on-gov-uk/

How we've been improving site search on GOV.UK

In the past few weeks, a small team in the Government Digital Service has been working to make significant improvements to site search on GOV.UK.

When GOV.UK came out of beta in October 2012, replacing the Directgov and Business Link websites, there were around 3,800 pieces of content. Six months on, and the bringing together of information from 24 departments and 31 agencies has added around 52,000 additional documents. In that time, it's become even harder for users to find what they’re looking for using site search on GOV.UK. And our analytics data and user feedback have consistently told us that search simply hasn’t been good enough. Time for some improvements.

Here's what we've done in the past couple of months.

1. We started with user needs

Based on existing user testing, user feedback and analytics, the team captured a list of user needs. We pulled together everything we already knew from our research to create 5 personas based on real user behaviour. This helped us to consider the needs of different types of users - from people with limited internet experience through to professionals who use the site every day for their work.

2. We agreed some principles for the project

We wanted to:

  • help more people find what they want using search
  • always return the most relevant results
  • avoid forcing users to understand the internal structure of the site
  • allow users to control their results
  • give results that feel familiar to users and don’t deviate from established models of what search looks like

3. We designed and developed with data

Our analytics helped us understand our users’ searching behaviour before we started work. We ran four rounds of user testing with participants recruited to represent users with a range of different needs. Week by week, we’ve added and improved new features based on the feedback and behaviour we’ve seen in our lab, making changes based on what we’ve learned. We've also tested our search results against our simple ‘health check’ tool (which verifies that the expected results appear for specific search terms) to prevent us accidentally making things worse.

4. We made it much more accessible

The original search results page had been implemented in a rush so we did a major clean up of the code and took the opportunity to make some much needed improvements:

  • the search query in the page heading is now legible and less confusing to screen-reader users
  • lists of search results are now properly marked up as HTML lists, allowing screen-readers and users of assisted technology to jump through results easily
  • the metadata for results is now more explicit in describing what this content actually is, making it less likely that users will become confused and frustrated

5. We give richer search results

Based on our user testing, we’ve recently introduced some improvements to search results:

  • changing the approach to tabbed search results (one of the biggest complaints with the previous version) to combine results more appropriately, helping people find what they’re looking for more easily
  • showing better metadata in search results, giving users more confidence in finding the right result
  • providing top 3 results above the tabs to help users find the most relevant content from across GOV.UK more easily
  • providing deep links directly within search results allows users to go straight to the right content without an additional click

Richer search results

6. Better support for 'power users'

Some of the most frequent users of search on GOV.UK are researchers and other civil servants, often trying to use GOV.UK every day to find specific content to help them do their jobs. We’ve got lots of ideas for improvements (including better support for exact phrase matching, supporting search operators and providing more detailed filtering options) but for now we’ve added the ability for users to filter results by department/organisation.

Organisation filtering on GOV.UK site search

7. We tried to make it ‘just work’

Probably our biggest improvement so far is improving the algorithm to drastically reduce the number of irrelevant results.

“...everybody expects search to read their minds.”
Martin Belam, 2009

We know that almost half of site searches on GOV.UK use 2 or 3 words. Additional words in a search query are often intended to narrow down a set of results to a more specific set of results (eg horse passports vs. passports) but instead we were returning results containing any of the words, which would often draw in many irrelevant results and frustrate users. We've now tweaked the search behaviour to ensure that adding terms narrows down the search results, reducing the number of irrelevant results.

Before and after

In the future, we’re also looking at automatically handling misspellings and offering a ‘did you mean?’ suggestion.

8. We cleared some technical debt

Making progress in the past few weeks has involved a fair bit of tidying up. We've made it easier to make it even better in future.

We're still not finished. We'll continue to analyse the data and test our improved search with users, and we've already uncovered a list of additional improvements and new features that we think will make search even better.

19 comments

  1. @Dreyer

    No mention of the technology stack delivering your search capabilities. Any insights into this?

    Link to this comment
  2. Jon Sundby

    Thanks, again, for your openness!
    I got curious about your health check’ tool . What is that?
    Another ting: Have you considered Google Site Search? Or compared your solution to it?

    Link to this comment
    • Roo Reynolds

      Hi Jon. The health check is an internal testing tool which verifies that known 'good' search results appear for specific search terms. It's essentially a safety net that automates the checking of some expected results for a long list of search terms when we test changes.

      Regarding Google Site Search, we've decided that the setting of Adsense cookies by Google Site Search isn't acceptable on GOV.UK.

      Link to this comment
      • mikeoneillincloud

        But Google Analytics cookies are OK? What is the actual difference?

        They still enable the US based receiving server, and who ever has access to it, to single out our citizens

        Link to this comment
  3. Andy Paddock

    I can vouch for the improvement, in a recent discussion regarding pointing people at .Gov for some of the documents we currently host I discounted the idea because it was impossible to get meaningful results for subsequent related searches. You had to go back to google to stand any chance of finding what you want.

    Having just performed a similar search I got the result I wanted and more related results.

    Happy to share the specifics if you need the info.

    Link to this comment
  4. rachecald

    Listening to user feedback and acting on it in a productive, measurable manner.

    GDS strikes again.

    Great work.

    Link to this comment
  5. Week 0 (resetting the clock) | jystewart.net

    […] was great to get the space to focus, but I was sorry to miss being in the office for the launch of some substantial improvements to the http://www.gov.uk site search. It was good to actually be involved in deploying some code for the first time in a while, working […]

    Link to this comment
  6. Charlie Hull (@FlaxSearch)

    Great to hear about the continuing progress on search! Many people fail to realise that search should be a 'living' project and there are always improvements to be made, glad to see the GDS team aren't falling into that trap! By the way in case you didn't know, 'did you mean' search features are now in elasticsearch as of v0.9.0 http://www.elasticsearch.org/blog/0-90-0-released/

    Link to this comment
    • Roo Reynolds

      Thanks Charlie. Yep. We've recently upgraded elasticsearch in order to take advantage of this and other features.

      Link to this comment
  7. Duplicate titles in site search | Inside GOV.UK

    […] been a GDS team diligently working away improving search on GOV.UK. They’ve asked us to relay some important general advice to Whitehall […]

    Link to this comment
  8. Dan

    May I suggest starting each (non-bullet) point with a capital?

    As you're not using bullet points (I'd be interested to know why) or full stops or semi-colons (which can give a cluttered look), they would help distinguish individual points, especially if a few are one line long.

    Link to this comment
    • Roo Reynolds

      Hi Dan

      Can you see any bullets in the blog post at all? (There are lots, though they so hang off the left rather than indenting the text.) It sounds like you can't. Where are they missing for you?

      Thanks
      Roo

      Link to this comment
      • Jon Sundby

        Hi. Thanks for including us in an internal discussion about bulletpoints. But should it really be open to everyone?

        Link to this comment
        • paulclarke

          Yes. In this case the comment (and suggestion for improvement) came from an external commenter. We generally get good results by having open discussion around what we do, even if, in this case, the issues under discussion weren't quite a matter of life and death 🙂

          Link to this comment
          • Dan

            To those of us concerned with page layouts it IS a matter of life, though admittedly not of death.

            Link to this comment
      • Dan

        I can't see any bullet points at all (I'm using IE8/PC).

        I read elsewhere that as part of the improvements discussed here, headers have been enlarged / icons removed, and I thought bullet points had been purged too; turns out it's just a bug...

        And I'm not internal!

        Link to this comment
  9. Lisa S

    I am one of the "power users" you mention - do you offer any guidance/training support? My fellow researchers and I often struggle to find the specific documentation we need - much of it historical - and I'm also looking to devise some training for our end users (lawyers in a law firm). It would be useful for us to speak or liaise with someone who can advise us on expert searching, and perhaps the criteria you use for what material is and is not included.

    Link to this comment