minibb®
Fight the automated spam - protect your miniBB-forums,
getting the Captcha addon! Click here to read more.
Captcha Addon for miniBB
Community Forum
 | Forums | File Bank | Sign Up | Reply | Search | Statistics | Manual |
How To miniBB Community Forum / How To /

How to disable Minibb Search

 Page:  1  2  »» 
Siavash
Forums Member
#1 | Posted: 7 Jul 2008 21:51
Reply 
My forum has more than one million posts, so each search can take a lots of resources,
right now I'm using google search as an alternative but some expert users are using minibb search by using /index.php?action=search in address bar,
I'd tried to remove this line in index.php :
elseif($action=='search'){if($reqTxt!=1)require('bb_func_txt.php');require('bb_func_search.php');}

but it seems it's need to find someone "Recent replies posted" in profiles
So is there any suggestion to remove search option without any conflict in profile?
Paul
CEO
#2 | Posted: 8 Jul 2008 03:27 | Edited by: Paul
Reply 
Siavash
Remove {$l_menu[1]} from header template and put this line under bb_plugins.php (preferrably right after if (!defined('INCLUDED776'))... ):

if($action=='search' and !isset($_GET['loc'])) die('');

Siavash
Forums Member
#3 | Posted: 8 Jul 2008 05:28
Reply 
Thanks Paul but if I put this code in plugings file, then we have problem in user profiles,
As you know "Recent replies posted" are using this format to bring the latest replies:
/index.php?action=search&loc=1&topic=4185&forum=11&page=30291

what should I do with this problem?
Paul
CEO
#4 | Posted: 8 Jul 2008 06:23
Reply 
Ah, I understand. I've fixed the code above, please check now.
Siavash
Forums Member
#5 | Posted: 8 Jul 2008 17:15 | Edited by: Siavash
Reply 
Thanks Paul
I changed it to:

if($action=='search' and (!isset($_GET['loc']) or $_GET['loc']!=1 )) die('');

I think this one is better because without "$_GET['loc']!=1" someone can use:

index.php?action=search&loc=3
;-)
tom322
Forums Member
#6 | Posted: 8 Jul 2008 18:27
Reply 
Alternatively, you could probably allow only search the last X months (not all years of forum existence), I think that would be much easier for the script..
Paul
CEO
#7 | Posted: 9 Jul 2008 04:30
Reply 
tom322:
Alternatively, you could probably allow only search the last X months (not all years of forum existence), I think that would be much easier for the script..

From the script point of view it doesn't matter when records must be posted: as soon as they all are in the same database, it is only up to database how to handle them. If you have 1 million records in database, they all are taken into attention anyway when making a date-based request.

Siavash
It's up to you ;-) However simply putting index.php?action=search&loc=3 won't bring any results, it will display just the search form. It doesn't give any benefit to the hackers, if you wanted to achieve it.
Siavash
Forums Member
#8 | Posted: 10 Jul 2008 02:02
Reply 
tom322
Thanks Tom, but I'm using Google search and it's good enough ;-)


Paul
You are right, thanks for your help!
tom322
Forums Member
#9 | Posted: 10 Jul 2008 07:56
Reply 
Siavash:
Thanks Tom, but I'm using Google search and it's good enough ;-)

So are you happy with their search, is it detailed enough? If there was no annoying ads that would be a good solution, but these ads...:
Paul
CEO
#10 | Posted: 10 Jul 2008 08:14
Reply 
My 2 cents: when it comes to millions of posts, there are only two ways: install Google search or program your own search engine from scratch. Google is not indexing ALL pages of your site, so search results won't be precise anyway. Also it will be possible to search for a free-type text only, not within range of dates for example, or by forums... But on the other hand, there is no way to program a quick search for mySQL, when a request could take many tens of seconds to execute. mySQL is not the best solution for a search engine at all.

So for miniBB it's still a better solution to install Google or other pre-cached search mechanism.
tom322
Forums Member
#11 | Posted: 10 Jul 2008 08:39
Reply 
I would assume Google "custom" search would actually search somehow inside your database; if it only searches pages that are indexed, that's a semi-solution indeed..
Siavash
Forums Member
#12 | Posted: 10 Jul 2008 10:30
Reply 
tom322:
So are you happy with their search, is it detailed enough?

It's enough for my forum, my forum has not scientific or very important contents ;-)
It's a place for daily chat or have some fun.
Paul
CEO
#13 | Posted: 10 Jul 2008 13:18
Reply 
tom322
Of course Google searches only for indexed pages.
tom322
Forums Member
#14 | Posted: 10 Jul 2008 14:42 | Edited by: tom322
Reply 
So as I understand it, it's not possible to make or optimize the search script in php/mysql efficient enough that it could handle millions of posts, correct? I see some big forums run on vbulletin have the same problems.. On the other hand searching only by topic titles (as it's by default) is not as resource-hungry as searching for both topics and thread, correct?

Also, what if someone hosted the forum on the most powerful, the fastest, dedicated server out there, would it make any difference if there were 10 million of posts or the hardware doesn't matter as much in this case..?
Paul
CEO
#15 | Posted: 11 Jul 2008 02:50
Reply 
tom322:
it's not possible to make or optimize the search script in php/mysql efficient enough that it could handle millions of posts, correct

I suppose it's a doubtful suggestion, because mySQL owners developing their product more and more optimized for large sets of data. But of course it's only oriented on a very specific case. I think using mySQL or other kind of database for a search engine is not the best method of implementation. As far as I know, big search programs are using straight text files, where each text file means kind of index. So when you search for something, this refers to the group of indexes i.e. files. I suppose Google uses each own indexing engine which is definitely not database-based.

I also think even if you search in topic titles by a simple keyword, this only increases a performance a bit, but still, execution is quite low as it may last for few seconds. I know forums where there is about 45,000 topics, the search in topic titles by a simple phrase takes there about 0,3 sec. on a dedicated server while there is about 200 users at second online. That's slow.

miniBB doesn't search in both topics and message texts for now. You can search only separately. This all is because for searching in topics and messages, we must have a special index field where these fields are concatenated. MySQL's FULLTEXT search is designed for such purpose, but it works only from the logical point of view, not the user's point of view. For example, if you type some keyword, and it's included in more than 80% of postings, search will fail saying the search term is not precise. FULLTEXT search is far from perfect in other aspects, too.

tom322:
Also, what if someone hosted the forum on the most powerful, the fastest, dedicated server out there, would it make any difference if there were 10 million of posts or the hardware doesn't matter as much in this case..?

I suppose it doesn't matter. Such kind of server should handle just your forums engine - displaying first page, topics, posts, user profiles etc. As about search, it's the most complicated part of it and mySQL simply has no power to handle it on millions of records.

But I hope in the future when this "million" problem becomes obvious, maybe there will be other solutions.
 Page:  1  2  »» 
Your reply
Bold Style  Italic Style  Image Link  URL Link 


» Username  » Password 
You are welcome to post anonymously by entering a nickname with no password (if that nickname has not been taken by another member) or by leaving both fields empty. If you have a forums membership account, you can also sign in from this page without posting a message, or sign in and post at once.

Before posting, be sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.

 
Online now: Guests - 42
Members - 0
Most users ever online: 191 [24 Dec 2007 14:33]
Guests - 191 / Members - 0

Forums are powered by miniBB®