fulltext - search functions

Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here.
Forum rules
Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here. Feature requests are closed.
Post Reply
User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

fulltext - search functions

Post by naderman »

Hi!

Well, in ACP there is
Enable search facilities:
User and backend search functions including fulltext updates when posting.
Min characters indexed by search:
Words with at least this many characters will be indexed for searching.
Max characters indexed by search:
Words with no more than this many characters will be indexed for searching.
Enable fulltext updating:
Updating of fulltext indexes when posting, overriden if search is disabled.

Can anyone explain me in detail what the options advantages and disadvantages are because I'm not very familiar to anything that has to do with optimizing searches in mysql.

nademan

User avatar
dhn
Registered User
Posts: 1518
Joined: Wed Jul 04, 2001 8:10 am
Location: Around the corner
Contact:

Re: fulltext - search functions

Post by dhn »

naderman wrote:Enable search facilities:
User and backend search functions including fulltext updates when posting.
Turn search on or off.
naderman wrote:Min characters indexed by search:
Words with at least this many characters will be indexed for searching.
Here you can adjust how many characters a word needs to have as minimum to get indexed. If you set it to 4, words like PHP or pie won't be included in the search and therefore wouln't be found. The suggested setting would be 3, there are hardly important words with 2 or less letters.
But if your forum is not about technical subjects, and there aren't a lot of three-letter words or acronyms that are important, you can set it to 4 or higher and reduce the search table size.
naderman wrote:Max characters indexed by search:
Words with no more than this many characters will be indexed for searching.
Respective setting to the minimum one. If you leave it too low words like "Supercalifrajalisticexpialidocious" or the beloved "lololololololololololololololololololololololololololol" won't get indexed and won't be found in a search. Again, this is done to keep the search tables down.
naderman wrote: Enable fulltext updating:
Updating of fulltext indexes when posting, overriden if search is disabled.
After you post a topic phpbb goes through every word of the post, decides if it is a too common, a too long or too short word (according to the above settings) and stores them in the index table. So, here you can disable that it does this check, which will on boards with heavy load, increase the speed drastically.
Of course searches to new topics won't work until you either manually do the update (Search Indexing in the admin panel) or let the forum automatically do it if the load has decreased at a certain time of the day for instance (not yet implented, not sure how this will be handled).
Image

User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

Re: fulltext - search functions

Post by naderman »

Thx dhn, I think I understood it now :D

Wert
Registered User
Posts: 400
Joined: Tue Jul 03, 2001 8:33 pm

Re: fulltext - search functions

Post by Wert »

Out of curiosity, what are the default min/max character settings for 2.06?

Need good web hosting? I recommend Hostrocket.

User avatar
SHS`
Registered User
Posts: 1628
Joined: Wed Jul 04, 2001 9:13 am
Location: The Boonies, Hong Kong
Contact:

Re: fulltext - search functions

Post by SHS` »

Wert wrote:Out of curiosity, what are the default min/max character settings for 2.06?
2.0.6 ;)

http://cvs.sourceforge.net/viewcvs.py/* ... v=1.8.2.17" target="_blank

Code: Select all

if ( $mode == 'post' )
	{
		$entry = str_replace('*', ' ', $entry);

		// 'words' that consist of <3 or >20 characters are removed.
		$entry = preg_replace('/[ ]([\S]{1,2}|[\S]{21,})[ ]/',' ', $entry);
	}
Jonathan “SHS`” Stanley • 史德信
phpBB™ 3.1.x, Bug/Security trackers
phpBB™ Bertie Bear 3.0 — prosilver Edition!Asking Questions The Smart Way

User avatar
A_Jelly_Doughnut
Registered User
Posts: 1780
Joined: Wed Jun 04, 2003 4:23 pm

Re: fulltext - search functions

Post by A_Jelly_Doughnut »

IMHO, 20 is going a little too high for maximum length. I'll probably set it to 12 when 2.2 is released.

I'd have done this in 2.0.6, but I tried and b0rked the regexp :P

Regardless, does anyone agree with me?
A_Jelly_Doughnut

Post Reply