mirror of
https://github.com/mkdocs/mkdocs.git
synced 2026-03-27 09:58:31 +07:00
Add minimum search length configuration parameter.
Allow users to set their own minimum search term length. Fixes #2014.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user