|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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.
|
|
#2
|
|||
|
|||
|
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
|
|
#3
|
|||
|
|||
|
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?
|
|
#4
|
|||
|
|||
|
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.
|
|
#5
|
|||
|
|||
|
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.
|
|
#6
|
|||
|
|||
|
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 |
|
#7
|
|||
|
|||
|
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. |
|
#8
|
|||
|
|||
|
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? |
|
#9
|
|||
|
|||
|
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.
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > Programming Tools > Article Discussion: Developing a Dynamic Document Search in PHP Part 1/2 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|