diff options
| author | Nils Adermann <naderman@naderman.de> | 2007-03-04 16:05:17 +0000 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2007-03-04 16:05:17 +0000 |
| commit | ac21b7d47b4c8783a41ba4dbf8d26971c252c6d1 (patch) | |
| tree | 8110ad6a167a84c7c6d0a849ec9fa645ed5b1178 /phpBB/includes/search/fulltext_native.php | |
| parent | 567b01302b735c03e596be1b1b7d01261084c62b (diff) | |
| download | forums-ac21b7d47b4c8783a41ba4dbf8d26971c252c6d1.tar forums-ac21b7d47b4c8783a41ba4dbf8d26971c252c6d1.tar.gz forums-ac21b7d47b4c8783a41ba4dbf8d26971c252c6d1.tar.bz2 forums-ac21b7d47b4c8783a41ba4dbf8d26971c252c6d1.tar.xz forums-ac21b7d47b4c8783a41ba4dbf8d26971c252c6d1.zip | |
- added a UNIQUE index on the wordmatch table
- some modifications of search indexing which might improve the speed and hopefully fixes [Bug #8352]
- added logging to search indexing [Bug #8384]
git-svn-id: file:///svn/phpbb/trunk@7119 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/search/fulltext_native.php')
| -rwxr-xr-x | phpBB/includes/search/fulltext_native.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php index 5ff0c3c566..2d08a3020b 100755 --- a/phpBB/includes/search/fulltext_native.php +++ b/phpBB/includes/search/fulltext_native.php @@ -1110,7 +1110,6 @@ class fulltext_native extends search_backend $word_ids[$row['word_text']] = $row['word_id']; } $db->sql_freeresult($result); - $new_words = array_diff($unique_add_words, array_keys($word_ids)); if (sizeof($new_words)) @@ -1121,8 +1120,9 @@ class fulltext_native extends search_backend { $sql_ary[] = array('word_text' => $word); } - + $db->return_on_error = true; $db->sql_multi_insert(SEARCH_WORDLIST_TABLE, $sql_ary); + $db->return_on_error = false; } unset($new_words, $sql_ary); } @@ -1149,6 +1149,7 @@ class fulltext_native extends search_backend } } + $db->return_on_error = true; foreach ($words['add'] as $word_in => $word_ary) { $title_match = ($word_in == 'title') ? 1 : 0; @@ -1162,6 +1163,7 @@ class fulltext_native extends search_backend $db->sql_query($sql); } } + $db->return_on_error = false; // destroy cached search results containing any of the words removed or added $this->destroy_cache(array_unique(array_merge($words['add']['post'], $words['add']['title'], $words['del']['post'], $words['del']['title'])), array($poster_id)); |
