diff --git a/Changelog.md b/Changelog.md
index 0369f82..77f2590 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -27,6 +27,7 @@ This file holds the changelog for Pepperminty Wiki. This is the master list of t
  - Make `invindex-rebuild` admin-only, but allow access if the POST param `secret` is set to your secret in `peppermint.json`
  - Improved the wording of the deletion confirmation and error pages
  - Search now searches matching tags as well as pages
+ - Updated the search ranking algorithm to put more weight against longer words than shorter ones.
 
 ## v0.14
 
diff --git a/build/index.php b/build/index.php
index e7bb941..4e6aaec 100644
--- a/build/index.php
+++ b/build/index.php
@@ -4182,7 +4182,7 @@ class search
 					if(!isset($matching_pages[$pageid]["title-matches"]))
 						$matching_pages[$pageid]["title-matches"] = 0;
 					
-					$matching_pages[$pageid]["title-matches"] += count(mb_stripos_all($pagename, $qterm));
+					$matching_pages[$pageid]["title-matches"] += count(mb_stripos_all($pagename, $qterm)) * strlen($qterm);
 				}
 				
 				// Consider matches in the page's tags
@@ -4195,7 +4195,7 @@ class search
 					// Set up a counter for tag match if there isn't one already
 					if(!isset($matching_pages[$pageid]["tag-matches"]))
 						$matching_pages[$pageid]["tag-matches"] = 0;
-					$matching_pages[$pageid]["tag-matches"] += count(mb_stripos_all(implode(" ", $pagedata->tags), $qterm));
+					$matching_pages[$pageid]["tag-matches"] += count(mb_stripos_all(implode(" ", $pagedata->tags), $qterm)) * strlen($qterm);
 				}
 			}
 		}
@@ -4212,7 +4212,8 @@ class search
 			foreach($pagedata["nterms"] as $pterm => $entry)
 			{
 				// Add the number of occurrences of this search term to the ranking
-				$pagedata["rank"] += $entry["freq"];
+				// Multiply it by the length of the word
+				$pagedata["rank"] += $entry["freq"] * strlen($pterm);
 				
 				// Add the offsets to a listof all offsets on this page
 				foreach($entry["offsets"] as $offset)
diff --git a/module_index.json b/module_index.json
index a630577..4e17d1a 100755
--- a/module_index.json
+++ b/module_index.json
@@ -104,7 +104,7 @@
         "author": "Starbeamrainbowlabs",
         "description": "Adds proper search functionality to Pepperminty Wiki using an inverted index to provide a full text search engine. If pages don't show up, then you might have hit a stop word. If not, try requesting the `invindex-rebuild` action to rebuild the inverted index from scratch.",
         "id": "feature-search",
-        "lastupdate": 1508017313,
+        "lastupdate": 1508071155,
         "optional": false
     },
     {
diff --git a/modules/feature-search.php b/modules/feature-search.php
index 0d240f3..b6186a6 100644
--- a/modules/feature-search.php
+++ b/modules/feature-search.php
@@ -727,7 +727,7 @@ class search
 					if(!isset($matching_pages[$pageid]["title-matches"]))
 						$matching_pages[$pageid]["title-matches"] = 0;
 					
-					$matching_pages[$pageid]["title-matches"] += count(mb_stripos_all($pagename, $qterm));
+					$matching_pages[$pageid]["title-matches"] += count(mb_stripos_all($pagename, $qterm)) * strlen($qterm);
 				}
 				
 				// Consider matches in the page's tags
@@ -740,7 +740,7 @@ class search
 					// Set up a counter for tag match if there isn't one already
 					if(!isset($matching_pages[$pageid]["tag-matches"]))
 						$matching_pages[$pageid]["tag-matches"] = 0;
-					$matching_pages[$pageid]["tag-matches"] += count(mb_stripos_all(implode(" ", $pagedata->tags), $qterm));
+					$matching_pages[$pageid]["tag-matches"] += count(mb_stripos_all(implode(" ", $pagedata->tags), $qterm)) * strlen($qterm);
 				}
 			}
 		}
@@ -757,7 +757,8 @@ class search
 			foreach($pagedata["nterms"] as $pterm => $entry)
 			{
 				// Add the number of occurrences of this search term to the ranking
-				$pagedata["rank"] += $entry["freq"];
+				// Multiply it by the length of the word
+				$pagedata["rank"] += $entry["freq"] * strlen($pterm);
 				
 				// Add the offsets to a listof all offsets on this page
 				foreach($entry["offsets"] as $offset)
