From 4e65041849ee1c5638448d4ced1ec78ae41530e7 Mon Sep 17 00:00:00 2001
From: Peter Mosses <p.d.mosses@me.com>
Date: Sat, 31 Aug 2019 16:52:41 +0200
Subject: [PATCH] Revert "Add configuration option search_tokenizer_separator"

This reverts commit 50cdf076b4c1859f5677919ccf2006e3ecc65e2e.
---
 _config.yml                | 5 -----
 assets/js/just-the-docs.js | 2 +-
 docs/search.md             | 9 ---------
 3 files changed, 1 insertion(+), 15 deletions(-)

diff --git a/_config.yml b/_config.yml
index a2e3952c..d12d4396 100644
--- a/_config.yml
+++ b/_config.yml
@@ -24,11 +24,6 @@ exclude: ["node_modules/", "*.gemspec", "*.gem", "Gemfile", "Gemfile.lock", "pac
 # Enable or disable the site search
 search_enabled: true
 
-# Set the search token separator
-search_tokenizer_separator: /[\s\-/]+/
-# For hyphenated-word search:
-# search_tokenizer_separator: /[\s/]+/
-
 # Enable or disable heading anchors
 heading_anchors: true
 
diff --git a/assets/js/just-the-docs.js b/assets/js/just-the-docs.js
index 308460e3..aadbf826 100644
--- a/assets/js/just-the-docs.js
+++ b/assets/js/just-the-docs.js
@@ -53,7 +53,7 @@ function initSearch() {
       // Success!
       var data = JSON.parse(request.responseText);
 
-      lunr.tokenizer.separator = {{ site.search_tokenizer_separator }}
+      lunr.tokenizer.separator = /[\s\-/]+/
       var index = lunr(function () {
         this.ref('id');
         this.field('title', { boost: 200 });
diff --git a/docs/search.md b/docs/search.md
index 74b398f3..134e3997 100644
--- a/docs/search.md
+++ b/docs/search.md
@@ -59,15 +59,6 @@ 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