RE: [PHP] Search Results Accuracy

2006-12-18 Thread zoticaic
Hi,

 

I'm not really sure which is the best path to go but let me give you an example
scenario : 



1. We already have a database of varchar data : 

+---+

|   links  |

+---+

| 340-golfers-dream-and-swimmers|

+---+

| 89-golfers-dream   |

+---+

| 45-golf-equipments|

+---+

| 3-best-golf-training |

+---+

| 0-golf-equipment-and-training  |

+---+

| 39-golf-training  |

+---+



 

2. From data above if we search the database for '%golf%' it would return all
rows as results, if we search for '%golf%training%' it would return three rows .

 

How do I choose from the multiple results? For the '%golf%' query, the desired
result is golf-equipments or golf-training, while for '%golf%training%' the
desired result should be 39-golf-training alone . This is sort of like search
engine ranking their results, but for this how do I set the criteria using MySQL
queries or if not possible using PHP .

 

I hope it makes it more clear, questions are welcomed.

 

TIA

Jervin

 

--
 Outsource Now | GetAFreelancer
http://www.getafreelancer.com/affiliates/shockx/ 

  _  

From: Shafiq Rehman [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 19, 2006 2:07 PM
To: zoticaic
Subject: Re: [PHP] Search Results Accuracy

 

Hello,

Your question is not very clear, please elaborate it.

btw, Are you talking about the fulltext search?

-- 
Shafiq Rehman
Sr. Web Engineer
http://www.phpgurru.com  http://www.phpgurru.com 



On 12/19/06, zoticaic [EMAIL PROTECTED] wrote:

Hello,



I'm just wondering, from a list of search results from a database query, how do
we trim down and return the most accurate one?



Hints, links and suggestions are most welcome.



TIA

Jervin



--
 Outsource Now | GetAFreelancer
http://www.getafreelancer.com/affiliates/shockx/











Re: [PHP] Search Results Accuracy

2006-12-18 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-12-19 09:33:02 +0800:
 Hello,
 
  
 
 I'm just wondering, from a list of search results from a database query, how 
 do
 we trim down and return the most accurate one? 
 
  
 
 Hints, links and suggestions are most welcome.

is this what you're looking for?

http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Search Results Accuracy

2006-12-18 Thread zoticaic
Thanks,

 

All I needed was that to get started with.

 

Regards

jervin

--
 Outsource Now | GetAFreelancer
http://www.getafreelancer.com/affiliates/shockx/ 

  _  

From: Shafiq Rehman [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 19, 2006 2:41 PM
To: zoticaic
Subject: Re: [PHP] Search Results Accuracy

 

Hello,

In searching, like queries are not recommended because these are the most
slowest queries. You must use full text searching. It will rocks your search
speed and suits your scenario. Here is an article for fulltext searching 

http://www.onlamp.com/pub/a/onlamp/2003/06/26/fulltext.html

-- 
Shafiq Rehman
Sr. Web Engineer
http://www.phpgurru.com



On 12/19/06, zoticaic [EMAIL PROTECTED] wrote:

Hi,

 

I'm not really sure which is the best path to go but let me give you an example
scenario : 

1. We already have a database of varchar data : 

+---+

|   links  |

+---+

| 340-golfers-dream-and-swimmers|

+---+

| 89-golfers-dream   |

+---+

| 45-golf-equipments|

+---+

| 3-best-golf-training |

+---+

| 0-golf-equipment-and-training  |

+---+

| 39-golf-training  |

+---+



 

2. From data above if we search the database for '%golf%' it would return all
rows as results, if we search for '%golf%training%' it would return three rows .

 

How do I choose from the multiple results? For the '%golf%' query, the desired
result is golf-equipments or golf-training, while for '%golf%training%' the
desired result should be 39-golf-training alone . This is sort of like search
engine ranking their results, but for this how do I set the criteria using MySQL
queries or if not possible using PHP .

 

I hope it makes it more clear, questions are welcomed.

 

TIA

Jervin

 

--
 Outsource Now | GetAFreelancer
http://www.getafreelancer.com/affiliates/shockx/  

  _  

From: Shafiq Rehman [mailto: [EMAIL PROTECTED] 
Sent: Tuesday, December 19, 2006 2:07 PM
To: zoticaic
Subject: Re: [PHP] Search Results Accuracy

 

Hello,

Your question is not very clear, please elaborate it.

btw, Are you talking about the fulltext search?

-- 
Shafiq Rehman
Sr. Web Engineer
http://www.phpgurru.com  http://www.phpgurru.com 

On 12/19/06, zoticaic [EMAIL PROTECTED] wrote:

Hello,



I'm just wondering, from a list of search results from a database query, how do
we trim down and return the most accurate one?



Hints, links and suggestions are most welcome.



TIA

Jervin



--
 Outsource Now | GetAFreelancer
http://www.getafreelancer.com/affiliates/shockx/