1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-22 04:23:01 +00:00

Disable the didyoumean typo correction engine by default & add it to the changelog

This commit is contained in:
Starbeamrainbowlabs 2020-04-21 22:13:08 +01:00
parent 8278cd052b
commit 2dacc5f99c
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
3 changed files with 11 additions and 2 deletions

View file

@ -22,6 +22,11 @@ This file holds the changelog for Pepperminty Wiki. This is the master list of t
- Wiki administrators with terminal/console access can now make use of a brand-new CLI by executing `php ./index.php` (warning: strange things will happen if the current working directory is not the directory that contains index.php and peppermint.json)
- Added new `anoncomments` setting to control whether anonymous users are allowed to make comments (disabled by default) - thanks to @SeanFromIT for suggesting it in #181
- Added markdown support for media captions (#184)
- Finally: *Experimental* didyoumean support. Ever made a typo in a search query? The new didyoumean engine can correct query terms that are up to 2 characters out!
- It's disabled by default (check out the new `search_didyoumean_enabled` setting), as it enabling it comes with a significant performance impact when typos are corrected (~0.8s-ish / typo is currently observed)
- Uses the words in the search index as a base for corrections (so if you have a typo on a page, then it will correct it to the typo)
- The index does _not_ currently update when you edit a page - this feature is still _very_ experimental (please report any issues)
- A typo is a search query term that is both not a stop word and not found in the search index
### Fixed
- Fixed weighted word support on search query analysis debug page
@ -50,6 +55,10 @@ This file holds the changelog for Pepperminty Wiki. This is the master list of t
- [Module Api] Add new `absolute` and `html` optional boolean arguments to `render_timestamp()`
- [Module Api] `search::extract_context()` and `search::highlight_context()` now take in a _parsed_ query (with `search::stas_parse()`), not a raw string
### Known bugs
- Wow, a new section! Haven't seen one of these before. Hopefully we don't see it too often.....
- The didyoumean search query typo correction engine does not currently update it's index when you save an edit to a page (the typo correction engine is still under development).
## v0.20.3-hotfix3
- Squash password-based warning (#182, thanks, @SeanFromIT!)

View file

@ -3,7 +3,7 @@ register_module([
"name" => "Did you mean? support",
"version" => "0.1",
"author" => "Starbeamrainbowlabs",
"description" => "Ever searched for something but couldn't find it because you couldn't spell it correctly? This module is for you! It adds spelling correction for search queries based on the words in the inverted search index.",
"description" => "*Experimental* Ever searched for something but couldn't find it because you couldn't spell it correctly? This module is for you! It adds spelling correction for search queries based on the words in the inverted search index.",
"id" => "feature-search-didyoumean",
"depends" => [ "lib-search-engine", "lib-storage-box" ],
"code" => function() {

View file

@ -228,7 +228,7 @@
"search_characters_context_total": { "type": "number", "description": "The total number of characters that a search result context should display at most.", "default": 250 },
"search_title_matches_weighting": { "type": "number", "description": "The weighting to give to search term matches found in a page's title.", "default": 10 },
"search_tags_matches_weighting": { "type": "number", "description": "The weighting to give to search term matches found in a page's tags.", "default": 3 },
"search_didyoumean_enabled": { "type": "checkbox", "description": "Whether to enable the 'did you mean?' search query typo correction engine.", "default": true },
"search_didyoumean_enabled": { "type": "checkbox", "description": "Whether to enable the 'did you mean?' search query typo correction engine.", "default": false },
"search_didyoumean_editdistance": { "type": "number", "description": "The maximmum edit distance to search when checking for typos. Increasing this number causes an exponential increase in the amount of computing power required to correct all spellings.", "default": 2 },
"search_didyoumean_cost_insert": { "type": "number", "description": "The insert cost to use when calculating levenshtein distances. If this value is changed then the did you mean index must be rebuilt.", "default": 1 },
"search_didyoumean_cost_delete": { "type": "number", "description": "The delete cost to use when calculating levenshtein distances. If this value is changed then the did you mean index must be rebuilt.", "default": 1 },