Programming Tools
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingProgramming Tools

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old June 26th, 2003, 09:37 PM
mytch mytch is offline
Dev Articles Novice (500 - 999 posts)
 
Join Date: Apr 2002
Location: Sydney, Australia
Posts: 589 mytch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Article Discussion: Developing a Dynamic Document Search in PHP Part 1/2

If you have any questions or comments about this article then please post them here.

Reply With Quote
  #2  
Old June 27th, 2003, 12:37 AM
AmericanD AmericanD is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Posts: 81 AmericanD User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
On the second page itself (first coding page), i think there is a ']' missing here. I could be wrong

while ( $row = mysql_fetch_array($result) ) {
$allWords[$row[‘keyword’] = $row[‘keyid’];
}
}
__________________
Hungry for Code

Programming works best with a team over one single person

Reply With Quote
  #3  
Old June 27th, 2003, 12:43 PM
torkil torkil is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 6 torkil User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ExtractWords() Function

What will this function do with words like Jim-Bob, mike's, n'gorogoro, ko-dang, taekwon-do, etc? Will this make a search less exact because only [A-Za-z] is allowed?

Reply With Quote
  #4  
Old July 2nd, 2003, 11:42 PM
chrishergert chrishergert is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Edgewood, WA
Posts: 4 chrishergert User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to chrishergert Send a message via AIM to chrishergert
is this needed?

Wouldn't it be much faster to run a FULLTEXT search and parse the results either from the query or in memory with PHP? just a thought.

Reply With Quote
  #5  
Old July 3rd, 2003, 12:06 AM
AmericanD AmericanD is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Posts: 81 AmericanD User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
this is just a technique if you want to use better algorithms for searching your site. for example using keyword relevance or page ranks etc.

Reply With Quote
  #6  
Old July 3rd, 2003, 02:30 AM
torkil torkil is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 6 torkil User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Fulltext search

From what I can see in the user contributed comments in the mysql online manual, the fulltext search is far from perfect:

http://www.mysql.com/doc/en/Fulltext_Search.html

Reply With Quote
  #7  
Old July 3rd, 2003, 04:00 AM
chrishergert chrishergert is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Edgewood, WA
Posts: 4 chrishergert User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to chrishergert Send a message via AIM to chrishergert
bah

its all about technique. The nice thing about Fulltext is you have a very able boolean search engine that is extremely similar to google's advanced capabilities. If you are really serious about searching maybe postgres is the way to go anyway. I've ran systems on both, and there really isnt much speed difference unless your doing views, multi-table deletes, etc...which cant be done in mysql as of a stable release now anyway.

Oh, and FULLTEXT gives you back a ranking which reduces the need to do your own. Ive been using fulltext on plenty of professional sites (with a little modification to help the searching along) and it is more than pleasing.

Reply With Quote
  #8  
Old July 3rd, 2003, 04:05 AM
torkil torkil is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 6 torkil User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Performance

How will a FULLTEXT search work with my news site when it has to search through over 50 000 news articles with pre-header (varchar 100), title (varchar 100), header (varchar 255) and body (text)? And how will this scale if 4-5 users do a search at the same time?

Anyone have any actual performance experience from using fulltext searches? Any benchmarks?

Reply With Quote
  #9  
Old July 4th, 2003, 12:16 AM
chrishergert chrishergert is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Edgewood, WA
Posts: 4 chrishergert User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to chrishergert Send a message via AIM to chrishergert
ok

I have a zipcode algorythim that searches through nearly 50,000 zipcodes for regression analysis and radius searching. It performes with more than 20,000 results in less than 1.8 seconds. This tied with a second caching system makes most searches within .02 seconds for any result. By doing it this way, the penalty isnt on inputting data.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingProgramming Tools > Article Discussion: Developing a Dynamic Document Search in PHP Part 1/2


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT