Add minimum search length configuration parameter.

Allow users to set their own minimum search term length.  Fixes #2014.
This commit is contained in:
Jim Conner
2020-03-16 18:35:06 +00:00
committed by GitHub
parent 653ba22230
commit 2505a907f4
6 changed files with 40 additions and 1 deletions

View File

@@ -502,6 +502,22 @@ plugins:
**default**: `'[\s\-]+'`
##### **min_search_length**
An integer value that defines the minimum length for a search query. By default
searches shorter than 3 chars in length are ignored as search result quality with
short search terms is poor. However, for some use cases (such as documentation
about Message Queues which might generate searches for 'MQ') it may be preferable
to set a shorter limit.
```yaml
plugins:
- search:
min_search_length: 2
```
**default**: 3
##### **lang**
A list of languages to use when building the search index as identified by their