Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
  #1  
Old 02-02-2015, 05:45 PM
MrEyes MrEyes is offline
 
Join Date: Nov 2004
Posts: 380
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Search not working after upgrade to vBulletin 4.2.2 Patch Level 4

Hello all,

After upgrading from 4.2.2 PL1 to 4.2.2 PL 4 the site searching no longer work, i.e. when users visit the following link (New Posts):

mysite.co.uk/search.php?do=getnew&contenttype=vBForum_Post

They following message:

Quote:
Sorry, there are no new posts to view.

You may search for posts updated during the previous 24 hours, here
Also worth noting that the word 'here' in the message above links to:

mysite.co.uk/search.php?do=getdaily

and that results in the following message:

Quote:
Sorry - no matches. Please try some different terms.
Worth noting that there definitely are new posts

As another example, the site is motorbike related so it is a word that is used very often. If I search 'motorbike' I get:

Quote:
Sorry - no matches. Please try some different terms.
Queue Search Updates is set to yes and the scheduled job is active and set to trigger every 10 minutes. As per usual I have disabled all plugins and still get exactly the same behaviour. I have also run command line mysqlcheck against the DB and this has not highlighted any issues

Any ideas?

EDIT: When running mysqlcheck I did notice a number of tables I don't recall seeing before. All with names as follows (the number at the end changes):

taggregate_temp_1410699360

Is this potential and indication of a failed upgrade? i.e. temp tables being left behind?
Reply With Quote
  #2  
Old 02-02-2015, 06:27 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MrEyes View Post
EDIT: When running mysqlcheck I did notice a number of tables I don't recall seeing before. All with names as follows (the number at the end changes):

taggregate_temp_1410699360

Is this potential and indication of a failed upgrade? i.e. temp tables being left behind?
Those are created by the scheduled task that updates thread view counts. They shouldn't really be hanging around, but it doesn't have to do with search or with upgrading.
Reply With Quote
  #3  
Old 02-03-2015, 11:12 AM
Gio~Logist's Avatar
Gio~Logist Gio~Logist is offline
 
Join Date: Jun 2004
Location: San Francisco
Posts: 2,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try rebuilding your search index and see if that helps. I would also clear my "searchlog" table if you're familiar with doing so.
Reply With Quote
  #4  
Old 02-03-2015, 10:24 PM
MrEyes MrEyes is offline
 
Join Date: Nov 2004
Posts: 380
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Rightio, I have rebuilt the searchindexes using the command line utility as this is a mid to large site and doing this via ACP isn't really viable.

Unfortunately this made no difference, the problem still remains.

Regarding the suggestion of clearing the search log. Are you talking about done a delete from / truncate of the searchlog table? Fairly simple to do via SQL admin but thought it better to check before I wade in with a delete command

For reference, here is the output from the reindex:

Quote:
[root@s17738471 temp]# php searchindex.php
PHP Warning: PHP Startup: apc.shm_size now uses M/G suffixes, please update your ini files in Unknown on line 0
Please enter the path to your vBulletin directory: /var/www/vhosts/mysite.co.uk/httpdocs/
Rebuild Search Index
--------------------
Note:
You should not normally need to empty the search index, however if items are showing in search results after they have been permanently deleted then emptying the index and rebuilding the search index will fix this. Search will not work correctly after emptying the index until the index is fully rebuilt.
Click Here to empty the search index.
Empty Index [0/1,Default=0]:

0) All
3) Forums
1) Posts
7) Groups
5) Group Messages
11) Visitor Messages
16) Blog Comments
15) Blog Entries
Content type to index [Default=0]: 0
Turn off DB indexes during rebuild [0/1,Default=0]: 0
Item id to start at [Default=0]:
Number of items to process per batch [Default=10000]:

Building Search Index Forums ...
IDs 0-140 ... Done (0.22 sec)
Building Search Index Forums: Done
Building Search Index Posts ...
IDs 0-10000 ... Done (26.08 sec)
IDs 10000-20000 ... Done (26.84 sec)
IDs 20000-30000 ... Done (25.90 sec)
<snip>
My SSH connection timed out at around 140k, so after logon I restarted the index at 140k - the only difference was that I set the rerun to use 1000 batches rather than 10000 as this made progress more obvious. The following is the last few lines of the output

Quote:
IDs 2346000-2347000 ... Done (4.88 sec)
IDs 2347000-2348000 ... Done (2.38 sec)
IDs 2348000-2348538 ... Done (1.53 sec)
Building Search Index Posts: Done
Building Search Index Groups ...
Building Search Index Groups: Done
Building Search Index Group Messages ...
Building Search Index Group Messages: Done
Building Search Index Visitor Messages ...
Building Search Index Visitor Messages: Done
Building Search Index Blog Comments ...
Building Search Index Blog Comments: Done
Building Search Index Blog Entries ...
Building Search Index Blog Entries: Done
Building Search Index: 0 hours, 59 minutes and 00 seconds
Reply With Quote
  #5  
Old 02-04-2015, 02:10 AM
edgeless edgeless is offline
 
Join Date: Mar 2013
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you issue the REPAIR TABLE quick commands for searchcore_text and searchgroup_text, and then rebiuld the FULLTEXT indexes, and then drop the old indexes from the tables, and then create new FULLTEXT indexes for searchcore_text (title, keywordtext) and searchgroup_text (title)? That has worked for me in the past to straighten out various db search issues.
Reply With Quote
  #6  
Old 02-04-2015, 02:50 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try disabling your server caching (apc?) and see if search works then.
Reply With Quote
  #7  
Old 02-04-2015, 07:01 AM
MrEyes MrEyes is offline
 
Join Date: Nov 2004
Posts: 380
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Short story, still no worky

Long story....

I have stopped APC* by disabling at both PHP (via apc.ini and then restarting httpd) and also vBulletin (config.php). I also confirmed it was stopped by loading the APC admin panel and getting the following:

Quote:
No cache info available. APC does not appear to be running.
I have also issued the following two SQL commands:

Quote:
REPAIR TABLE searchcore_text QUICK
REPAIR TABLE searchgroup_text QUICK
Per SQL docs these should rebuild the full text indexes.

As mentioned, neither solution fixed the issue.

* As an APC related aside I have fixed the PHP warning warning that came up when running searchindex.php via the command line (i.e. PHP Warning: PHP Startup: apc.shm_size now uses M/G suffixes, please update your ini files in Unknown on line 0)
Reply With Quote
  #8  
Old 02-04-2015, 01:44 PM
edgeless edgeless is offline
 
Join Date: Mar 2013
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is what has worked for me...

Temporarily turn off forum access from the vB ACP... at Settings > Turn Your vBulletin On and Off.

If you have modified full-text variables that affect indexing or changed the stopword file itself, you must rebuild your FULLTEXT indexes after making those changes and restarting the MySQL server.

To restart the MySQL server, use the following command:

service mysql restart

Next, log into a MySQL terminal session.

To rebuild the indexes it is usually sufficient to do a QUICK repair operation with:

mysql> REPAIR TABLE searchcore_text QUICK;
mysql> REPAIR TABLE searchgroup_text QUICK;

Next, restart the MySQL server again:

service mysql restart

Next, rebuild your FULLTEXT indexes. To rebuild your indexes, you need to run the follow queries in sequence...

But before doing so, emptying your search tables will speed things up. The queries to empty the tables are:

truncate searchcore;
truncate searchcore_text;
truncate searchgroup;
truncate searchgroup_text;


Next you need to drop the old indexes off the tables. To drop the indexes, use the following commands:

drop index text on searchcore_text;
drop index grouptitle on searchgroup_text;

Finally, you need to build new indexes. To recreate the specific indexes, use the following commands:

CREATE FULLTEXT INDEX text ON searchcore_text (title, keywordtext);
CREATE FULLTEXT INDEX grouptitle ON searchgroup_text (title);

You can then go to your vB ACP and do an interface-executed rebuild session from there. To do this, go to the Maintenance > General Update Tools section of your vBulletin ACP. You optionally may want to empty the indexes from there before starting the rebuild process.


Note: My search functionality wouldn't fully return until I did the following.

Go to the Maintenance > Repair / Optimize Tables section of your vBulletin ACP and optimize the post and thread word tables.

Next, you should probably then go to the Forums & Moderators > Forum Blocks Manager section of your vB ACP and click on Reload Block Types.

Finally, re-enable your general forum access from the vB ACP at Settings > Turn Your vBulletin On and Off.

Done.

--------------- Added [DATE]1423066500[/DATE] at [TIME]1423066500[/TIME] ---------------

One more noteworthy observation... I have noticed that after performing the above steps, there has been a significant latency period before the search function returned to normal. I'm assuming that such 'lag' to gain back correct search functionality is related to size of the particular database and the processor speed of the hosting machine in conjunction and how quickly those elements can complete the necessary work to restructure the indexes for the entire database. But that's merely a guess on my part. The main point is that once you've performed the above steps, you may want to give it a bit of time before concluding that things haven't changed.
Reply With Quote
Благодарность от:
Gio~Logist
  #9  
Old 02-04-2015, 02:49 PM
Gio~Logist's Avatar
Gio~Logist Gio~Logist is offline
 
Join Date: Jun 2004
Location: San Francisco
Posts: 2,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow, that's quite the headache. Glad you're finally sorted though :up:
Reply With Quote
  #10  
Old 02-07-2015, 06:06 PM
MrEyes MrEyes is offline
 
Join Date: Nov 2004
Posts: 380
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Had to wait for the weekend to try the above...

Drum roll please....

It didn't work, still the same issue as described above (for more info on the steps performed see below)

As a curious aside, one member was reporting that search was working for them. Turns out what they were doing was going into Advanced Search and under single content types selecting "show results as posts". Which is curious.

Quote:
Originally Posted by Stuff I Did
Quote:
Originally Posted by In vBulletin ACP
VB ACP -> Settings -> Options -> Turn Your vBulletin On and Off -> Turn site off
Quote:
Originally Posted by SSH to Server
[usr@xxxxxx ~]# /etc/init.d/mysqld restart
Stopping mysqld: [ OK ]
Starting mysqld: [ OK ]

[usr@xxxxxx ~]# mysql -h 127.0.0.1 -p -u USERNAME DATABASENAME
Enter password:

mysql> REPAIR TABLE searchcore_text QUICK;
+--------------------------------+--------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+--------------------------------+--------+----------+----------+
| mydb.searchcore_text | repair | status | OK |
+--------------------------------+--------+----------+----------+
1 row in set (40.89 sec)

mysql> REPAIR TABLE searchgroup_text QUICK;
+---------------------------------+--------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+---------------------------------+--------+----------+----------+
| mydb.searchgroup_text | repair | status | OK |
+---------------------------------+--------+----------+----------+
1 row in set (0.10 sec)

mysql> exit
Bye
[usr@xxxxxx ~]# /etc/init.d/mysqld restart
Stopping mysqld: [ OK ]
Starting mysqld: [ OK ]

[usr@xxxxxx ~]# mysql -h 127.0.0.1 -p -u USERNAME DATABASENAME
Enter password:

mysql> truncate searchcore;
Query OK, 0 rows affected (0.00 sec)

mysql> truncate searchcore_text;
Query OK, 0 rows affected (0.11 sec)

mysql> truncate searchgroup;
Query OK, 0 rows affected (0.01 sec)

mysql> truncate searchgroup_text;
Query OK, 0 rows affected (0.00 sec)

mysql> drop index text on searchcore_text;
Query OK, 0 rows affected (0.01 sec)
Records: 0 Duplicates: 0 Warnings: 0

mysql> drop index grouptitle on searchgroup_text;
Query OK, 0 rows affected (0.00 sec)
Records: 0 Duplicates: 0 Warnings: 0

mysql> CREATE FULLTEXT INDEX text ON searchcore_text (title, keywordtext);
Query OK, 0 rows affected (0.00 sec)
Records: 0 Duplicates: 0 Warnings: 0

mysql> CREATE FULLTEXT INDEX grouptitle ON searchgroup_text (title);
Query OK, 0 rows affected (0.00 sec)
Records: 0 Duplicates: 0 Warnings: 0

mysql> exit
Bye

[usr@xxxxxx]# php searchindex.php
Please enter the path to your vBulletin directory: /var/www/vhosts/mysite.co.uk/httpdocs/
Rebuild Search Index
--------------------
Note:
You should not normally need to empty the search index, however if items are showing in search results after they have been permanently deleted then emptying the index and rebuilding the search index will fix this. Search will not work correctly after emptying the index until the index is fully rebuilt.
Click Here to empty the search index.
Empty Index [0/1,Default=0]: 1

0) All
3) Forums
1) Posts
7) Groups
5) Group Messages
11) Visitor Messages
16) Blog Comments
15) Blog Entries
Content type to index [Default=0]: 0
Turn off DB indexes during rebuild [0/1,Default=0]: 0
Item id to start at [Default=0]: 0
Number of items to process per batch [Default=10000]: 1000

Building Search Index Forums ...
IDs 0-140 ... Done (0.11 sec)
Building Search Index Forums: Done
Building Search Index Posts ...
IDs 0-1000 ... Done (2.94 sec)
IDs 1000-2000 ... Done (2.44 sec)
IDs 2000-3000 ... Done (2.61 sec)
IDs 3000-4000 ... Done (2.97 sec)
<SNIP SNIP SNIP>
<SNIP SNIP SNIP>
<SNIP SNIP SNIP>
<SNIP SNIP SNIP>
<SNIP SNIP SNIP>
IDs 2347000-2348000 ... Done (3.50 sec)
IDs 2348000-2349000 ... Done (3.88 sec)
IDs 2349000-2350000 ... Done (2.75 sec)
IDs 2350000-2350784 ... Done (2.58 sec)
Building Search Index Posts: Done
Building Search Index Groups ...
IDs 0-48 ... Done (0.14 sec)
Building Search Index Groups: Done
Building Search Index Group Messages ...
IDs 0-1000 ... Done (3.30 sec)
IDs 1000-2000 ... Done (3.14 sec)
IDs 2000-3000 ... Done (3.87 sec)
IDs 3000-4000 ... Done (3.48 sec)
IDs 4000-5000 ... Done (2.17 sec)
IDs 5000-6000 ... Done (3.24 sec)
IDs 6000-7000 ... Done (3.05 sec)
IDs 7000-8000 ... Done (1.84 sec)
IDs 8000-9000 ... Done (3.54 sec)
IDs 9000-9584 ... Done (0.33 sec)
Building Search Index Group Messages: Done
Building Search Index Visitor Messages ...
IDs 0-1000 ... Done (3.10 sec)
IDs 1000-2000 ... Done (3.42 sec)
IDs 2000-3000 ... Done (3.36 sec)
IDs 3000-3882 ... Done (2.81 sec)
Building Search Index Visitor Messages: Done
Building Search Index Blog Comments ...
IDs 0-1000 ... Done (0.85 sec)
IDs 1000-2000 ... Done (1.13 sec)
IDs 2000-3000 ... Done (3.13 sec)
IDs 3000-3345 ... Done (0.83 sec)
Building Search Index Blog Comments: Done
Building Search Index Blog Entries ...
IDs 0-1000 ... Done (2.89 sec)
IDs 1000-1265 ... Done (0.94 sec)
Building Search Index Blog Entries: Done
Building Search Index: 2 hours, 22 minutes and 35 seconds
[usr@xxxxxx]#
Quote:
Originally Posted by In vBulletin ACP
VB ACP -> Maintenance -> Repair / Optimize Tables -> Select POST table -> Continue
post Check Status: OK
post Optimize Status: OK

VB ACP -> Maintenance -> Repair / Optimize Tables -> Select all thread tables -> Continue
thread Check Status: OK
thread Optimize Status: OK
thread_serviceupdate Check Status: OK
thread_serviceupdate Optimize Note: Table does not support optimize, doing recreate + analyze instead
thread_serviceupdate Optimize Status: OK
threadrate Check Status: OK
threadrate Optimize Status: OK
threadread Check Status: OK
threadread Optimize Status: OK
threadredirect Check Status: OK
threadredirect Optimize Status: OK
threadviews Check Status: OK
threadviews Optimize Status: OK

VB ACP -> Forums & Moderators -> Forum Blocks Manager -> Reload Block Types


VB ACP -> Settings -> Options -> Turn Your vBulletin On and Off -> Turn site on
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:54 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04955 seconds
  • Memory Usage 2,297KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (12)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete