[BETA] Rebuild Search Mod

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
akslee
Registered User
Posts: 82
Joined: Sat Aug 02, 2003 6:54 pm
Location: Vancouver
Contact:

Post by akslee »

Sod this.
I found this and it works flawlessly.

http://www.phpbbhacks.com/viewhack.php?id=434
"If you have a great time teaching your child, and your child has a great time, there simply isn't anyway you can lose."

www.ChildBrain.org
User avatar
303
Registered User
Posts: 344
Joined: Wed Jun 12, 2002 6:11 am
Contact:

Post by 303 »

akslee wrote: Sod this.
I found this and it works flawlessly.

http://www.phpbbhacks.com/viewhack.php?id=434


I think it's a same hack :roll:
303
User avatar
davidshook
Registered User
Posts: 24
Joined: Sat Nov 06, 2004 8:25 am

how to instal on different skin

Post by davidshook »

Not an experienced user.

How do I install this MOD on a skin other than SubSilver.
My forum use NoseBleed skin and I am not sure what to do with files:
## templates/subSilver/admin/rebuild_search.tpl
## templates/subSilver/admin/rebuild_search_progress.tpl

Thanks in advance for any help.
User avatar
Politicsinfo
Registered User
Posts: 26
Joined: Fri Jul 09, 2004 10:58 am
Location: Brussels
Contact:

Re: how to instal on different skin

Post by Politicsinfo »

davidshook wrote: Not an experienced user.

How do I install this MOD on a skin other than SubSilver.
My forum use NoseBleed skin and I am not sure what to do with files:
## templates/subSilver/admin/rebuild_search.tpl
## templates/subSilver/admin/rebuild_search_progress.tpl

Thanks in advance for any help.


Just put these files in

## templates/NoseBleed/admin/rebuild_search.tpl
## templates/NoseBleed/admin/rebuild_search_progress.tpl

and the mod should work just fine ;)
I proudly present to you:

-0- Politicsinfo.be -0-
carloz
Registered User
Posts: 6
Joined: Sat Jan 08, 2005 2:16 pm

Post by carloz »

Politicsinfo wrote: post_limit=1
time_limit=0
refresh_rate=3
I also run the mod with these settings, but i dont know where post_limit and time_limit stands for...

Can someone explain?

With these settings, is my search worse than it would be when i use the standard settings?
chali
Registered User
Posts: 16
Joined: Fri Dec 10, 2004 6:01 pm

Post by chali »

carloz wrote:
Politicsinfo wrote: post_limit=1
time_limit=0
refresh_rate=3
I also run the mod with these settings, but i dont know where post_limit and time_limit stands for...

Can someone explain?

With these settings, is my search worse than it would be when i use the standard settings?

- post limit i guess is the amount of post to process every refresh.
- time limit is the time that you give the script to process a "post_limit" amount of posts before returning with time-out

I also need to avoid the time() function to make it work, i was having 0% all the time.

For veeery large databases you can specify decimals in the percentage

find

Code: Select all

'PERCENT' => round ((($start + $num_rows) / $total_num_rows) * 100),
replace with:

Code: Select all

'PERCENT' => round (((($start + $num_rows) / $total_num_rows) * 100),3),
Where the las "3" is the number of decimals to show you can replace it.[/code]
Presto
Registered User
Posts: 132
Joined: Sat Oct 06, 2001 5:12 pm
Location: Holland

Post by Presto »

Maybe I'm missing something but it's not working.

1. Downloaded the zip file.
2. Followed the .mod instructions
3. Disabled my board and went to the admin module for this mod
4. Hit the button to run the script.
5. I see the page refreshing every 3 seconds but when having a look at the database... the 3 search tables have been cleaned but they stay empty.

I'm running phpBB 11 and mysql.

Help 8)


-edit-

I'm talking about 13347 posts to be exactly.
pappa
Registered User
Posts: 115
Joined: Fri Jan 23, 2004 2:42 am

Post by pappa »

I had to stop the update at about 2/3 % on a board with 30,000 posst will I need to delete the table data before I start again or will it not reindex that part ?

ps can any one comfirm the 2 tables

and what setting work best for people in the options
Presto
Registered User
Posts: 132
Joined: Sat Oct 06, 2001 5:12 pm
Location: Holland

Post by Presto »

s2000 wrote: I solveded removing on line 88 the onTime() check..

from this:

Code: Select all

while (($row = $db->sql_fetchrow ($result)) && (onTime () == true)) {
		add_search_words('single', $row['post_id'], stripslashes($row['post_text']), stripslashes($row['post_subject']));
		$num_rows++;
	}
to this:

Code: Select all

while (($row = $db->sql_fetchrow ($result))/* && (onTime () == true)*/) {
		add_search_words('single', $row['post_id'], stripslashes($row['post_text']), stripslashes($row['post_subject']));
		$num_rows++;
}
now it works..

Bye


Yes, it also worked for me!
I used your edited code and changed the max posts from 1000 to 100... hit the button and voila. My search is working smoothly again :D
chali
Registered User
Posts: 16
Joined: Fri Dec 10, 2004 6:01 pm

Post by chali »

Presto wrote: Yes, it also worked for me!
I used your edited code and changed the max posts from 1000 to 100... hit the button and voila. My search is working smoothly again :D


how many post do you have in your board?
Presto
Registered User
Posts: 132
Joined: Sat Oct 06, 2001 5:12 pm
Location: Holland

Post by Presto »

13353...
Joe Belmaati
Registered User
Posts: 2110
Joined: Sun Sep 28, 2003 7:35 pm
Location: Denmark

Post by Joe Belmaati »

It's very interesting to see how differently this MOD behaves on different servers. The other day I flushed my word_list and word_match tables, then did a complete rebuild in about 20 minutes on a board with ~30,000 posts. And I haven't bypassed the timeout. I think that the conclusion must be that this MOD works as written but that your milage will vary hugely, server performance depending.
Tora
Registered User
Posts: 15
Joined: Wed Dec 01, 2004 10:28 pm

Post by Tora »

Hi, I was able to get this mod to work on my productivity phpbb, by taking out the (onTime () == true) part as described above, and with very low settings. Sadly, I'm getting error 500 - internal server errors now, always close to the end of the script (97+% completion).

I am quite lost here and inreasingly frustrated, because I have tried to re-index my search tables for 3 days now in vain, trying different scripts.

Is there any other suggestion of what to do, besides importing a dump of my live system into my development system locally, re-indexing there, and importing the search tables back into the live system again - something would preferably not do?

Any hints, tipps and help would be greatly appreciated!
User avatar
Merri
Registered User
Posts: 255
Joined: Mon Nov 25, 2002 1:08 pm
Location: Riihimäki, Finland
Contact:

Post by Merri »

Tip: make the script page appear in a separate tab or window, without the menu frame. This way you can see the url it was in and are able to manually try to continue. If it doesn't go through, just make it handle even less posts at once.

Also, make sure your service provider isn't killing the script, mine did as they thought it was a script that wasn't working properly...


I've made a custom script done that seems to run more reliably on a server with a higher load. You can customize the number of posts it handles by editing the url. You can also define the last post to be handled, so the forum can be kept online (this may result some odd behaviour, like topics that get hidden on the forum - the topics may be restored simply by searching one of more of their posts and replying to the topic again - even search doesn't show the topic, you'll have to search for the posts).
chali
Registered User
Posts: 16
Joined: Fri Dec 10, 2004 6:01 pm

Post by chali »

if this script indexing <3 letters words?

if it is: is there a way to increase the minimun amount of letters to like 4?

thanks
Post Reply

Return to “[2.0.x] MODs in Development”