From 20bced794fb9b082512f2dc4dafdee7800bb5ff1 Mon Sep 17 00:00:00 2001 From: Mat Moore Date: Tue, 30 Apr 2024 15:05:14 +0100 Subject: [PATCH] Add a details component with search query tips Provide some query examples highlighting some of the supported syntax, and link to the full documentation in Datahub. This should help mitigate the sometimes unintuitive default behaviour of requiring that ALL search terms match. This behaviour is how Datahub have configured search, and to change it we would have to customise the Elasticsearch query. --- templates/search.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/templates/search.html b/templates/search.html index 52ff3ea5..af9279d1 100644 --- a/templates/search.html +++ b/templates/search.html @@ -21,6 +21,22 @@

{{h1_value}}

+
+ + + Search query tips + + +
+
    +
  • Use multiple words to narrow down your search.

    For example: prisons probation matches data mentioning "prisons" AND "probation".

  • +
  • Separate words with a pipe to broaden your search.

    For example: prisons | probation matches data mentioning "prisons" OR "probation".

  • +
  • Quote phrases to require an exact match.

    For example: "case management" matches the exact phrase "case management" but not either word on its own.

  • +
  • Use a minus sign to exclude words.

    For example: courts -magistrates excludes any results that mention "magistrates".

  • +
+

More search query examples

+
+