diff options
author | Michael Hamann <michael@content-space.de> | 2013-12-11 23:02:17 +0100 |
---|---|---|
committer | Michael Hamann <michael@content-space.de> | 2013-12-11 23:09:32 +0100 |
commit | 5a1d05488ca6e176af4d195accbdca8010cf3416 (patch) | |
tree | b7e8dd545d6be19f8d0c8527d57cc23f1c2212fb /inc | |
parent | ef00962189d77a87a26d132bd84cb7176e96e185 (diff) | |
download | rpg-5a1d05488ca6e176af4d195accbdca8010cf3416.tar.gz rpg-5a1d05488ca6e176af4d195accbdca8010cf3416.tar.bz2 |
Fix indexing numeric words in page contents
Since a8dba4523d2ecd09dd69a68a36673eaf5c009c57 the search index didn't
properly index numeric words anymore, instead they were added as new
words to the word list each time they were indexed, leading to an
ever-increasing index size.
Diffstat (limited to 'inc')
-rw-r--r-- | inc/indexer.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/inc/indexer.php b/inc/indexer.php index 658fb966b..07f29b542 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -10,7 +10,7 @@ if(!defined('DOKU_INC')) die('meh.'); // Version tag used to force rebuild on upgrade -define('INDEXER_VERSION', 7); +define('INDEXER_VERSION', 8); // set the minimum token length to use in the index (note, this doesn't apply to numeric tokens) if (!defined('IDX_MINWORDLENGTH')) define('IDX_MINWORDLENGTH',2); @@ -215,6 +215,7 @@ class Doku_Indexer { foreach (array_keys($words) as $wlen) { $word_idx = $this->getIndex('w', $wlen); foreach ($words[$wlen] as $word => $freq) { + $word = (string)$word; $wid = array_search($word, $word_idx, true); if ($wid === false) { $wid = count($word_idx); |