mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-21 16:13:00 +00:00
search: properly apply weightings in titlels and tags
This commit is contained in:
parent
b2a783e903
commit
77880d9410
2 changed files with 3 additions and 2 deletions
|
@ -18,6 +18,7 @@ This file holds the changelog for Pepperminty Wiki. This is the master list of t
|
|||
## Fixed
|
||||
- [security] Fixed some potential XSS attacks in the page editor
|
||||
- Fixed a weird bug in the `stats-update` action causing warnings
|
||||
- search: Properly apply weightings of matches in page titles and tags
|
||||
|
||||
|
||||
## v0.22
|
||||
|
|
|
@ -865,7 +865,7 @@ class search
|
|||
if(!isset($matching_pages[$pageid]))
|
||||
$matching_pages[$pageid] = $match_template; // Assign by copy
|
||||
|
||||
$matching_pages[$pageid]["rank_title"] += $title_matches_count * $term_def["weight"];
|
||||
$matching_pages[$pageid]["rank_title"] += $title_matches_count * $term_def["weight"] * $settings->search_title_matches_weighting;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -886,7 +886,7 @@ class search
|
|||
if(!isset($matching_pages[$pageid]))
|
||||
$matching_pages[$pageid] = $match_template; // Assign by copy
|
||||
|
||||
$matching_pages[$pageid]["rank_tags"] += $tag_matches_count * $term_def["weight"];
|
||||
$matching_pages[$pageid]["rank_tags"] += $tag_matches_count * $term_def["weight"] * $settings->search_tags_matches_weighting;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue