News:

Follow us on Bluesky!

Main Menu

Search Facility

Started by riker, September 22, 2008, 10:42:18 AM

Previous topic - Next topic

riker

Since I've had to move my site to another host the beta 4 search facility doesn't seem to work right.  I keep getting the message

Quote
An Error Has Occurred!
The database value you're trying to insert does not exist: id_search

It worked okay before the move

ccbtimewiz


riker

#2
Quote from: ccbtimewiz on September 22, 2008, 11:28:12 AM
Do you have anything in your Forum Error Log?


Yes

Quote
Apply Filter: Only show the errors of this type Type of error: Critical
Apply Filter: Only show the error messages of this URL http://tvlicenceresistance.info/forum/index.php?action=search2
Apply Filter: Only show the errors with the same message The database value you're trying to insert does not exist: id_search
Function: PlushSearch2
Apply Filter: Only show the errors from this file File: /www/oxyhost.com/t/v/l/tvlicence/htdocs/forum/Sources/Search.php
Line: 1538

Quote1518:                   $new_weight_total += $weight[$type];
1519:                }
1520:                $main_query['select']['relevance'] = substr($relevance, 0, -3) . ') / ' . $new_weight_total . ' AS relevance';
1521: 
1522:                $ignoreRequest = $smcFunc['db_search_query']('insert_log_search_results_no_index', ($smcFunc['db_support_ignore'] ? ( '
1523:                   INSERT IGNORE INTO ' . '{db_prefix}log_search_results
1524:                      (' . implode(', ', array_keys($main_query['select'])) . ')') : '') . '
1525:                   SELECT
1526:                      ' . implode(',
1527:                      ', $main_query['select']) . '
1528:                   FROM ' . $main_query['from'] . (empty($main_query['inner_join']) ? '' : '
1529:                      INNER JOIN ' . implode('
1530:                      INNER JOIN ', $main_query['inner_join'])) . (empty($main_query['left_join']) ? '' : '
1531:                      LEFT JOIN ' . implode('
1532:                      LEFT JOIN ', $main_query['left_join'])) . (!empty($main_query['where']) ? '
1533:                   WHERE ' : '') . implode('
1534:                      AND ', $main_query['where']) . (empty($main_query['group_by']) ? '' : '
1535:                   GROUP BY ' . implode(', ', $main_query['group_by'])) . (empty($modSettings['search_max_results']) ? '' : '
1536:                   LIMIT ' . $modSettings['search_max_results']),
1537:                   $main_query['parameters']
==>1538:                );
1539:                // We love to handle non-good databases that don't support our ignore!
1540:                if (!$smcFunc['db_support_ignore'])
1541:                {
1542:                   $inserts = array();
1543:                   while ($row = $smcFunc['db_fetch_row']($ignoreRequest))
1544:                   {
1545:                      // No duplicates!
1546:                      if (isset($inserts[$row[2]]))
1547:                         continue;
1548: 
1549:                      foreach ($row as $key => $value)
1550:                         $inserts[$row[2]][] = (int) $row[$key];
1551:                   }
1552:                   $smcFunc['db_free_result']($ignoreRequest);
1553: 
1554:                   // Now put them in!
1555:                   if (!empty($inserts))
1556:                   {
1557:                      $query_columns = array();
1558:                      foreach ($main_query['select'] as $k => $v)

I have changed the search.php file too for a fresh copy but as you can see no change

riker

This is the debug info

QuoteTemplates: 3: index (default), Search (default), Errors (default).
Sub templates: 6: init, html_above, body_above, fatal_error, body_below, html_below.
Language files: 2: index+Modifications.english (default), Search.english (default).
Style sheets: 1: index(default).
Files included: 17 - 529KB. (show./index.php, ./Settings.php, ./Sources/QueryString.php, ./Sources/Subs.php, ./Sources/Errors.php, ./Sources/Load.php, ./Sources/Security.php, ./Sources/LoadAds.php, ./Sources/Subs-Db-mysql.php, ./cache/data_42639672fe4ef80d5f29b4fb022735e9-SMF-modSettings.php, ./cache/data_42639672fe4ef80d5f29b4fb022735e9-SMF-theme_settings-1.php, ./cache/data_42639672fe4ef80d5f29b4fb022735e9-SMF-log_online-update.php, ./Sources/Search.php, ./Sources/Display.php, ./Sources/DbSearch-mysql.php, ./Sources/SearchAPI-Standard.php, ./cache/data_42639672fe4ef80d5f29b4fb022735e9-SMF-parsing_smileys.php)
Cache hits: 7: 0.00494s for 15869 bytes (showget modSettings: 0.00061 - 12504 bytes, get theme_settings-1: 0.00064 - 1915 bytes, get log_online-update: 0.00052 - 0 bytes, put log_online-update: 0.00031 - 13 bytes, put modSettings: 0.00021 - 0 bytes, get parsing_smileys: 0.00242 - 1437 bytes, get menu_buttons-1_8_9-english: 0.00022 - 0 bytes)
Queries used: 21

QuoteTemplates: 3: index (default), Search (default), Search (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 3: index+Modifications.english (default), Search.english (default), Errors.english (default).
Style sheets: 1: index(default).
Files included: 19 - 656KB. (show./index.php, ./Settings.php, ./Sources/QueryString.php, ./Sources/Subs.php, ./Sources/Errors.php, ./Sources/Load.php, ./Sources/Security.php, ./Sources/LoadAds.php, ./Sources/Subs-Db-mysql.php, ./cache/data_42639672fe4ef80d5f29b4fb022735e9-SMF-modSettings.php, ./cache/data_42639672fe4ef80d5f29b4fb022735e9-SMF-theme_settings-1.php, ./Sources/Search.php, ./Sources/ManageMaintenance.php, ./Themes/default/languages/Search.english.php, ./Sources/Display.php, ./Sources/DbSearch-mysql.php, ./Sources/SearchAPI-Standard.php, ./Themes/default/languages/Errors.english.php, ./cache/data_42639672fe4ef80d5f29b4fb022735e9-SMF-parsing_smileys.php)
Cache hits: 4: 0.00192s for 15856 bytes (showget modSettings: 0.00060 - 12504 bytes, get theme_settings-1: 0.00055 - 1915 bytes, get parsing_smileys: 0.00056 - 1437 bytes, get menu_buttons-1_8_9-english: 0.00021 - 0 bytes)
Queries used: 10.

      SELECT data
      FROM smf_sessions
      WHERE session_id = 'b0ab49a3da0db0d83bffdb6a3ccc4885'
      LIMIT 1
   in /www/oxyhost.com/t/v/l/tvlicence/htdocs/forum/Sources/Load.php line 2199, which took 0.00027323 seconds.

            SELECT mem.*, IFNULL(a.id_attach, 0) AS id_attach, a.filename, a.attachment_type
            FROM smf_members AS mem
               LEFT JOIN smf_attachments AS a ON (a.id_member = 1)
            WHERE mem.id_member = 1
            LIMIT 1
   in /www/oxyhost.com/t/v/l/tvlicence/htdocs/forum/Sources/Load.php line 351, which took 0.00046706 seconds.

      SELECT *
      FROM smf_ads
      order by ADS_ID
   in /www/oxyhost.com/t/v/l/tvlicence/htdocs/forum/Sources/LoadAds.php line 33, which took 8.583E-05 seconds.

         SELECT variable, value, id_member, id_theme
         FROM smf_themes
         WHERE id_member = 1
            AND id_theme = 1
   in /www/oxyhost.com/t/v/l/tvlicence/htdocs/forum/Sources/Load.php line 1311, which took 7.2E-05 seconds.

         SELECT b.id_board
         FROM smf_boards AS b
         WHERE 1=1
            AND b.id_board != 14
   in /www/oxyhost.com/t/v/l/tvlicence/htdocs/forum/Sources/Search.php line 526, which took 0.0001049 seconds.

         SELECT COUNT(*)
         FROM smf_boards
   in /www/oxyhost.com/t/v/l/tvlicence/htdocs/forum/Sources/Search.php line 548, which took 5.102E-05 seconds.

      SELECT b.id_cat, c.name AS cat_name, b.id_board, b.name, b.child_level
      FROM smf_boards AS b
         LEFT JOIN smf_categories AS c ON (c.id_cat = b.id_cat)
      WHERE 1=1
   in /www/oxyhost.com/t/v/l/tvlicence/htdocs/forum/Sources/Search.php line 154, which took 0.0005548 seconds.

      UPDATE smf_log_activity
      SET
         hits = hits + 1
      WHERE date = '2008-09-22'
   in /www/oxyhost.com/t/v/l/tvlicence/htdocs/forum/Sources/Subs.php line 2918, which took 0.00016403 seconds.

      UPDATE smf_ads
         SET hits = hits+1
            WHERE ADS_ID = 2
   in /www/oxyhost.com/t/v/l/tvlicence/htdocs/forum/Sources/LoadAds.php line 283, which took 0.0002892 seconds.

      UPDATE smf_ads
         SET hits = hits+1
            WHERE ADS_ID = 1
   in /www/oxyhost.com/t/v/l/tvlicence/htdocs/forum/Sources/LoadAds.php line 283, which took 0.000108 seconds.

[hide queries]

riker

Right got around this by using the "Fulltext index" search.   Perhaps the dev team can see what caused it though

Advertisement: