Seite 1 von 1
Problem mit Suchfunktion...
Verfasst: 10.04.2005 18:04
von trompetenforum
Hallo,
ich hoffe jemand kann mir helfen,die Suchfunktion liefert bei mir keine vollständigen Ergebnisse...
Beispiel die suche nach " rauchen " sollte z.B. u.a diesen
Beitrag
anzeigen...Tut Sie aber nicht...
Ich habe die Tables geprüft,den Searchindex neu aufgebaut und die search.php gecheckt aber nichts gefunden, auch der DB-Maintanance Mod ermittelt keine Fehler...
Habt Ihr eine Idee wodran es liegen könnte ?
Verfasst: 10.04.2005 22:04
von PhilippK
Geh mal in die Datenbank - Tabelle phpbb_search_wordlist. Suche da mal nach word_text = 'rauchen' und poste den Datensatz.
Gruß, Philipp
Verfasst: 11.04.2005 14:32
von trompetenforum
Das ist der Datensatz :
word_text
word_id
word_common
rauchen
52914
0
Verfasst: 11.04.2005 21:20
von PhilippK
Merkwürdig...
Such mal in der phpbb_search_wordmatch nach der word_id
Gruß, Philipp
Verfasst: 12.04.2005 14:44
von trompetenforum
Bitte sehr
post_id
word_id
title_match
365
52914
0
6417
52914
0
6448
52914
0
6469
52914
0
6470
52914
0
Verfasst: 12.04.2005 22:31
von PhilippK
Wie hast du denn den Suchindex neu aufgebaut?
Gruß, Philipp
Verfasst: 13.04.2005 14:43
von trompetenforum
Über einen "Rebuild Search Index" Mod (gibt es einen anderen Weg ?!?) :
Code: Alles auswählen
/***************************************************************************
* admin_rebuild_search.php
* -------------------
* time : Thursday, January 30, 2003
* author : Peter Wyss
* email : wysspeter@bluewin.ch
* version : 1.2
*
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
define('IN_PHPBB', 1);
if( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['General']['Rebuild Search Index'] = $filename;
return;
}
//
// Include required files, get $phpEx and check permissions
//
$no_page_header = TRUE;
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);
if(( isset($HTTP_POST_VARS['rebuild'])) OR ($HTTP_GET_VARS['start_id'] > 0))
{
include($phpbb_root_path . 'includes/functions_search.'.$phpEx);
if ($HTTP_GET_VARS['start_id']==0)
{
// Empty wordlist tables
$sql = "DELETE FROM " . SEARCH_WORD_TABLE;
$result = $db->sql_query($sql);
if ( !$result )
{
message_die(GENERAL_ERROR, "Could not empty search_wordlist table.", "",__LINE__, __FILE__, $sql);
}
$sql = "DELETE FROM " . SEARCH_MATCH_TABLE;
$result = $db->sql_query($sql);
if ( !$result )
{
message_die(GENERAL_ERROR, "Could not empty search_wordmatch table.", "",__LINE__, __FILE__, $sql);
}
}
$sql = "SELECT count(*) as pcount FROM " . POSTS_TEXT_TABLE;
$result = $db->sql_query($sql);
if ( !$result )
{
message_die(GENERAL_ERROR, "Could not find posts.", "",__LINE__, __FILE__, $sql);
}
$postcount = $db->sql_fetchrow($result);
$nextpage = 0;
for( $i = $HTTP_GET_VARS['start_id']; $i < $postcount[pcount]; $i++ )
{
if ($i == $HTTP_GET_VARS['start_id'] + 100)
{
$nextpage=1;
break;
}
$sql = "SELECT post_id FROM " . POSTS_TEXT_TABLE . " LIMIT " . $i . ",1";
$result = $db->sql_query($sql);
if ( !$result )
{
message_die(GENERAL_ERROR, "Could not find posts.", "",__LINE__, __FILE__, $sql);
}
$posts = $db->sql_fetchrow($result);
$activeid = $posts['post_id'];
$sql = "SELECT * FROM " . POSTS_TEXT_TABLE . " WHERE post_id = " . $activeid;
$result = $db->sql_query($sql);
if ( !$result )
{
message_die(GENERAL_ERROR, "Could not find posts.", "",__LINE__, __FILE__, $sql);
}
$activepost = $db->sql_fetchrowset($result);
add_search_words('single', $activepost[0]['post_id'], stripslashes($activepost[0]['post_text']), stripslashes($activepost[0]['post_subject']));
}
if ($nextpage==1)
{
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("admin_rebuild_search.$phpEx?start_id=$i") . '">')
);
$message = $i . ' posts completed';
$message .= "<br /><br />" . sprintf('Click %sHere%s to continue (or wait 3 seconds)', "<a href=\"" . append_sid("admin_rebuild_search.$phpEx?start_id=$i") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
}
else
{
$message = 'Rebuild successful';
$message .= "<br /><br />" . sprintf('Click %sHere%s to return to \'Rebuild Search Index\'', "<a href=\"" . append_sid("admin_rebuild_search.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf('Click %sHere%s to return to the Admin Index', "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
}
}
$template->set_filenames(array(
"body" => "admin/rebuild_search_body.tpl")
);
$template->assign_vars(array(
"S_FORM_ACTION" => append_sid("admin_rebuild_search.$phpEx?start_id=0"),
"L_INFO" => $output_info,
"L_REBUILD_SEARCH_TITLE" => "Rebuild Search Index",
"L_REBUILD_SEARCH_SUBMIT" => "Rebuild")
);
include('./page_header_admin.'.$phpEx);
$template->pparse("body");
include('./page_footer_admin.'.$phpEx);
?>
Verfasst: 13.04.2005 20:29
von PhilippK
Versuch's mal mit DB Maintenance
Gruß, Philipp