From 7804642c50c5cb45750d8e186206e5f7efbf1c21 Mon Sep 17 00:00:00 2001 From: Patrick Marsceill <pmarsceill@users.noreply.github.com> Date: Mon, 9 Sep 2019 16:32:24 -0400 Subject: [PATCH] Update search.md --- docs/search.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/search.md b/docs/search.md index 134e3997..1a627d23 100644 --- a/docs/search.md +++ b/docs/search.md @@ -59,6 +59,15 @@ In your site's `_config.yml`, enable search: search_enabled: true ``` +The default is for hyphens to separate tokens in search terms: +`gem-based` is equivalent to `gem based`, matching either word. +To allow search for hyphenated words: + +```yaml +# Set the search token separator +search_tokenizer_separator: /[\s/]+/ +``` + ## Hiding pages from search Sometimes you might have a page that you don't want to be indexed for the search nor to show up in search results, e.g, a 404 page. To exclude a page from search, add the `search_exclude: true` parameter to the page's YAML front matter: -- GitLab