Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Fulltext boolean search v.2.2 for vB Details »
Fulltext boolean search v.2.2 for vB
Mod Version: 1.00, by JohnWoo (Member) JohnWoo is offline
Developer Last Online: Apr 2014 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.0.0 Rating: (0 vote - 0 average) Installs: 20
Released: 08 Mar 2004 Last Update: Never Downloads: 15
Not Supported  

Hello all!

Moving here from beta forum
http://www.vbulletin.org/forum/showthread.php?t=62218

This hack makes nearly same for vB3 as
[vB 2.2.x] - Mysql 4 Search hack
http://www.vbulletin.org/forum/showthread.php?t=51716
for vB2

You will need MySQL server v4.0.1 or better (but sometimes it may work on 3.23.xx). After installing you will be able to search with empty native vB index (word and postindex tables) and using modifiers.
Allowed modifiers + are ,-, * and "
All modifiers except * should be used only once for one word (in the beginning and without space).
* it should be used at the end of a word.
For example:
windows unix -> will find messages containing at least one these words.
+windows +unix -> will find messages with both this words.
windows* -> will find "windows", "windowss", "windowssauce" or "windowst".
*indows will NOT find "windows"
"some words" -> will find "some words of wisdom", but will not find "some extra words".
Search phrase length limitations replaced with results number limitation.
Value of old "Search Index Maximum Word Length" used to limit number of posts in the result returned by fulltext search (control panel/Message Searching Options)
Supposed that it must run faster then native vB search

History:
v.2.2 [5 Apr 2004]
- search words relevance (when sort by relevance) added at last
but little different then native vB (it may not work when searching with * modifiers)
- attempt to fix incompatibility with other hacks
=to upgrade replace code block #5 in search.php with latest one

v.2.1 [4 Apr 2004]
- Excluding from search forums with "Index New Posts in Search Engine" option set to "No"

v.2.0 [30 Mar 2004]
-"Similar Threads" now must start working (to move from 1.x to 2 just change one more script - functions_search.php)

v.1.9 [29 Mar 2004]
-checking if $query string is not empty before running fill text sql

v.1.8 [20 Mar 2004]
- line numbers and higlight code changed for VB3 Gold
- more tests and error explanations

v.1.7 [9 Mar 2004]
- MySQL error for administrators bug fixed
checking is $not_forumid string exixts before adding it to query

v.1.6 [9 Mar 2004]
- national letters bug fixed
preg_replace("~[^\w\"\-+\* ]~i", "", $query);
was replaced by
preg_replace("~[^\w\xC0-\xFF\"\-+\* ]~i", "", $query);

v.1.5 [8 Mar 2004]
- TABLE_PREFIX bug fixed
- slightly optimised SQL requests

v.1.4 [8 Mar 2004]
- delete_post_index function turned off
- more tests and error explanations

v.1.3 [7 Mar 2004]
- less code because of using native vB $postQueryLogic and $threadQueryLogic conditions
- more tests and error explanations

v.1.2 [7 Mar 2004]
- boolean mode can be turned off in AdminCP ("Allow Search Wild Cards" setting)
- "titles only" search fixed
- limiting number of matches retunned by fulltext search AFTER applying search conditions

v.1.1 [7 Mar 2004]
- HighLight support added

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Boolean Search in Search Drop-Down Menu Option in Navbar Neutral Singh vBulletin 3.5 Template Modifications 9 03 Jul 2007 20:58
Boolean Search as Default in Advanced Search Options Neutral Singh vBulletin 3.5 Template Modifications 6 12 Apr 2006 06:01
Fulltext boolean search for vB v.1.5 JohnWoo vBulletin 3.0 Beta Releases 13 07 Mar 2004 07:14

Comments
  #2  
Old 08 Mar 2004, 14:22
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Real name: Marco
This goes quick
Reply With Quote
  #3  
Old 08 Mar 2004, 17:16
MrNase's Avatar
MrNase MrNase is offline
 
Join Date: May 2003
Real name: Dominik
i'll give it a try
Reply With Quote
  #4  
Old 09 Mar 2004, 08:55
SDB SDB is offline
 
Join Date: Feb 2004
Anyone have any idea how efficient this is going to be with a very large board... 3 million posts.

Does it require firstly to index all of the current posts? If so, can anyone estimate how long that is likely to take?

thanks in advance
Reply With Quote
  #5  
Old 09 Mar 2004, 09:34
JohnWoo's Avatar
JohnWoo JohnWoo is offline
 
Join Date: Jan 2002
when you will say
ALTER TABLE post ADD FULLTEXT (title)
it will " index all of the current posts"
And not sure about 3 millions, but that request takes about 370 seconds on P4 2400/1G RAM/two SATA 120G Maxtor disks/MySQL 4.0.16 and ~427.000 posts
Reply With Quote
  #6  
Old 09 Mar 2004, 09:37
Archer Archer is offline
 
Join Date: Feb 2002
This part of code from block 2 strip national characters in query. E.g., russian characters not passed.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

If I comment it - search works.
I'm not guru in RegExp, so can't fix it by myself. Need help.
Reply With Quote
  #7  
Old 09 Mar 2004, 10:02
JohnWoo's Avatar
JohnWoo JohnWoo is offline
 
Join Date: Jan 2002
On all servers that I have ever seen (since php2 :) "\w" match national characters :) But not on in latest PHP versions...
but if you want, you may say
$query = preg_replace("~[^\w\xC0-\xFF\"\-+\* ]~i", "", $query);
:)

Last edited by JohnWoo; 09 Mar 2004 at 11:50. Reason: fixed regexp
Reply With Quote
  #8  
Old 09 Mar 2004, 10:31
Archer Archer is offline
 
Join Date: Feb 2002
Old expression strip russian characters at all.
Second one - left only first character.
Reply With Quote
  #9  
Old 09 Mar 2004, 11:43
JohnWoo's Avatar
JohnWoo JohnWoo is offline
 
Join Date: Jan 2002
true...
Just tested it on 7 hosts and on 3 of them it don't work... I need to update PHP version on my servers more frequently.
And
$query = preg_replace("~[^\w\xC0-\xFF\"\-+\* ]~i", "", $query);
go to v.1.6
Reply With Quote
  #10  
Old 09 Mar 2004, 11:51
Archer Archer is offline
 
Join Date: Feb 2002
Thanks!
Reply With Quote
  #11  
Old 09 Mar 2004, 16:16
ImportPassion ImportPassion is offline
 
Join Date: Mar 2002
anyone have a test site to try with lots of posts?
Reply With Quote
  #12  
Old 09 Mar 2004, 16:22
Archer Archer is offline
 
Join Date: Feb 2002
forum.wbfree.net
~270,000 posts
Reply With Quote
  #13  
Old 10 Mar 2004, 06:02
heynurse's Avatar
heynurse heynurse is offline
 
Join Date: Jan 2002
It looks like you have to register to search on that site? Any other sites? I doubt you want hundreds of us registering just to test out the search
Reply With Quote
  #14  
Old 10 Mar 2004, 06:18
webrats webrats is offline
 
Join Date: May 2002
ive got 40000 post not much
forums.webrats.com
i thinking of installing this
Reply With Quote
  #15  
Old 10 Mar 2004, 08:18
JohnWoo's Avatar
JohnWoo JohnWoo is offline
 
Join Date: Jan 2002
heynurse
Go to AdminCP and select

Usergroup Manager
[Edit] Unregistered / Not Logged In
check yes for
- Can View Forum
- Can View Others' Threads
- Can Search Forum
after it go to Forum Permissions and select what forums Unregistered users will be able to see, read and search
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 16:31.

Layout Options | Width: Wide Color: