miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
How To miniBB Support Forums / How To /  
 

How to disable Minibb Search

 
 
Page  Page 1 of 2:  1  2  Next »

Author Danny2000
Partaker
#1 | Posted: 7 Jul 2008 21:51 
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?

Author Paul
Lead Developer 
#2 | Posted: 8 Jul 2008 03:27 
Danny2000
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('');

Author Danny2000
Partaker
#3 | Posted: 8 Jul 2008 05:28 
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?

Author Paul
Lead Developer 
#4 | Posted: 8 Jul 2008 06:23 
Ah, I understand. I've fixed the code above, please check now.

Author Danny2000
Partaker
#5 | Posted: 8 Jul 2008 17:15 
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
;-)

Author tom322
Active Member
#6 | Posted: 8 Jul 2008 18:27 
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..

Author Paul
Lead Developer 
#7 | Posted: 9 Jul 2008 04:30 
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.

Danny2000
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.

Author Danny2000
Partaker
#8 | Posted: 10 Jul 2008 02:02 
tom322
Thanks Tom, but I'm using Google search and it's good enough ;-)


Paul
You are right, thanks for your help!

Author tom322
Active Member
#9 | Posted: 10 Jul 2008 07:56 
Danny2000:
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...:

Author Paul
Lead Developer 
#10 | Posted: 10 Jul 2008 08:14 
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.

Author tom322
Active Member
#11 | Posted: 10 Jul 2008 08:39 
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..

Author Danny2000
Partaker
#12 | Posted: 10 Jul 2008 10:30 
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.

Author Paul
Lead Developer 
#13 | Posted: 10 Jul 2008 13:18 
tom322
Of course Google searches only for indexed pages.

Author tom322
Active Member
#14 | Posted: 10 Jul 2008 14:42 
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..?

Author Paul
Lead Developer 
#15 | Posted: 11 Jul 2008 02:50 
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  Page 1 of 2:  1  2  Next » 
How To miniBB Support Forums / How To /
 How to disable Minibb Search
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑