vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Administrative and Maintenance Tools - Build Search-Index from Commandline (https://vborg.vbsupport.ru/showthread.php?t=240126)

Andreas 04-08-2010 10:00 PM

Build Search-Index from Commandline
 
1 Attachment(s)
Just a simple script that might be useful for someone ...

[s]Don't forget to adjust the path before running this![/s]
No longer necessary with new version.

Update 22.04.2010
I've polished the script a bit, it does no longer require to set the path (it will ask you for the path) and output some more status information

Update 26.04.2010
I've added a X % complete status message and changed the code a bit to avoid warnings if readline()-support is not available.

Important Note
[hr]fgf[/hr]
As stated above this Script is unsupported.
Any support requests except for proven bugs will be ignored, please do not waste your or my time writing them.
Thank you :)

Hornstar 04-09-2010 09:42 PM

Thanks, I was wondering how I was going to rebuild mine as I am more then the 1.2 million mark.

That is where people were having problems right?

MrD 04-10-2010 12:18 AM

Hi Andreas,
i got an Error :(
PHP Fatal error: require_once(): Failed opening required '/srv/www/vhosts/domain/httpdocs/vb/search/core.php' (include_path='.:/usr/share/php5:/usr/share/php5/PEAR') in /srv/www/vhosts/domain/httpdocs/searchindex.php on line 33

Andreas 04-10-2010 06:23 AM

That is a standard vBulletin file.
If it is not there your installation is either broken - or you did not adjust the path.

MrD 04-10-2010 09:35 AM

Hi Andreas,
the Permissions are wrong.
the script run´s now to the point that i can entry the elements.
then it goes to the Prompt.

Andreas 04-10-2010 10:09 AM

Strange :)

You can try to comment out the first two lines (error_reporting, ini_set) and see what happens

MrD 04-10-2010 10:49 AM

Hi Andreas
Quote:

Suchindex neu erstellen
-----------------------
Hinweis: Wenn Sie den Index neu erstellen, sollten Sie den bestehenden vorher l? schen. Suchindex l?schen!
Empty Index [No]: yes

0) Alle
Suchindex w?hlen [All]: all
ID, mit der begonnen werden soll [0]: 0
Anzahl der Elemente, die pro Durchgang verarbeitet werden sollen [10000]: 10000

s15285294:/srv/www/vhosts/domain/httpdocs #
thats all

Andreas 04-10-2010 11:12 AM

If you are commenting out the first two lines you should get at least one warning (unless your CLI php is configured to not display erors which would be a pretty unusal setup)

MrD 04-11-2010 12:41 PM

Hi Andreas,
i got a New error.
I put error Reporting on and now i become follow output.
Quote:

PHP Notice: Use of undefined constant DIR - assumed 'DIR' in /srv/www/vhosts/domain/httpdocs/includes/class_core.php on line 4493

Notice: Use of undefined constant DIR - assumed 'DIR' in /srv/www/vhosts/domain/httpdocs/includes/class_core.php on line 4493
PHP Notice: Use of undefined constant DIR - assumed 'DIR' in /srv/www/vhosts/domain/httpdocs/includes/class_core.php on line 4494

Notice: Use of undefined constant DIR - assumed 'DIR' in /srv/www/vhosts/domain/httpdocs/includes/class_core.php on line 4494
<br /><strong>Warnung</strong>: parse_url(http:///searchindex.php): Unable to parse URL in <strong>/srv/www/vhosts/domain/httpdocs/includes/class_core.php</strong> (Zeile <strong>2017</strong>)<br />Suchindex neu erstellen
I think ther error is at the http:///

Andreas 04-11-2010 02:02 PM

At least there are some notices now ;)

Did you set the path correctly?

MrD 04-11-2010 02:26 PM

Hi Andreas,
yes the Path is set correctly

/srv/www/vhosts/domain/httpdocs

i think it´s the relativ path

Andreas 04-22-2010 04:23 AM

I've polished the script a bit, it does no longer require to set the path (it will ask you for the path) and output some more status information

sKippah 04-22-2010 11:05 AM

Could u give more explaintation? What is it, what is it doing?? Sry but i dont get it in anyway.

spoky29 04-22-2010 11:31 AM

screenshot please,but thanks anyway :)

Andreas 04-22-2010 03:09 PM

@sKippah, spoky29
No screenshots, no explanation - sorry.
If you do not know what this script is being used for you do not need it anyway.

Manoel J?nior 04-22-2010 06:10 PM

Hello Andreas, can better explain what this script do?

Thank you.

Andreas 04-23-2010 03:30 PM

@Manoel J?nior
This post contains the answer to your question:
https://vborg.vbsupport.ru/showpost....1&postcount=15

Manoel J?nior 04-24-2010 03:22 AM

@Andreas
Thank you for your education!
As always AN EXAMPLE.

--:

Code:

#!/usr/local/bin/php -q Please enter the path to your vBulletin directory:
Warning: fgets() expects parameter 1 to be resource, string given in /iG/dominios/XXXX/htdocs/forum/searchindex.php on line 11


Andreas 04-26-2010 04:08 AM

Another little update: It does show "X % complete" now for each loop and should also fix the warning (thanks for the bug report).

clubplanet 05-03-2010 01:35 PM

Thanks! This is just what I needed after an upgrade to vBulletin 4.

Vogelfreund 07-06-2010 08:11 PM

Thanks for the script... you did a great work..

Just rebuilding.. 1,8 million posts..

IDs 0-10000 ... Erledigt (269,63 sec - 0,45%)
IDs 10000-20000 ... Erledigt (204,11 sec - 0,89%)
IDs 20000-30000 ... Erledigt (200,77 sec - 1,34%)
IDs 30000-40000 ... Erledigt (230,40 sec - 1,78%)
IDs 40000-50000 ...

Fungsten 07-14-2010 11:24 PM

Andreas,

How do you use this script? My Search Index has to be rebuilt: the ACP won't do it.

life is boost 03-12-2011 01:31 PM

Will this script work on 4.1.0? our forum has over 4 million entry's, i tried this on our development server and after it ran i got this error when searching.

PHP Code:

MySQL Error Can't find FULLTEXT index matching the column list 

i had to drop my searchcore_text table and rebuild the table for search to work again.


All times are GMT. The time now is 06:36 AM.

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.01143 seconds
  • Memory Usage 1,760KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (23)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete