Click here to get back home

Search result ranking

 HomeNewsGroups | Search | About
 comp.lang.php    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Search result ranking Joe 06-11-2008
Get Chitika Premium
Posted by Joe on June 11, 2008, 6:39 am
Please log in for more thread options
I am trying to improve the quality of search results when a visitor
enters a search term, and I am interested in any algorithms you guys
use and have success with. Currently I do the following:

1) Break the term in to individual words.
2) Perform SQL DB search on individual words using LIKE '%term%'
3) Loop through all results counting how many occurances of the terms
4) order the results from high to low count.
5) display the results in that order

This is better than just searching SQL and dumping, however its still
pretty basic. Any thoughts or ideas?

Posted by Jerry Stuckle on June 11, 2008, 7:06 am
Please log in for more thread options
Joe wrote:
> I am trying to improve the quality of search results when a visitor
> enters a search term, and I am interested in any algorithms you guys
> use and have success with. Currently I do the following:
>
> 1) Break the term in to individual words.
> 2) Perform SQL DB search on individual words using LIKE '%term%'
> 3) Loop through all results counting how many occurances of the terms
> 4) order the results from high to low count.
> 5) display the results in that order
>
> This is better than just searching SQL and dumping, however its still
> pretty basic. Any thoughts or ideas?
>

And your PHP question is?

I'd suggest you find a more appropriate newsgroup - one that knows about
search engines. You'll get a lot better answers.

Most people here don't write search engines nor do they have any inkling
about how to prioritize results. It's a lot more complicated than just
counting the number of times a word occurs.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================


Posted by Joe on June 11, 2008, 7:25 am
Please log in for more thread options
> Joe wrote:
> > I am trying to improve the quality of search results when a visitor
> > enters a search term, and I am interested in any algorithms you guys
> > use and have success with. Currently I do the following:
>
> > 1) Break the term in to individual words.
> > 2) Perform SQL DB search on individual words using LIKE '%term%'
> > 3) Loop through all results counting how many occurances of the terms
> > 4) order the results from high to low count.
> > 5) display the results in that order
>
> > This is better than just searching SQL and dumping, however its still
> > pretty basic. Any thoughts or ideas?
>
> And your PHP question is?
>
> I'd suggest you find a more appropriate newsgroup - one that knows about
> search engines. You'll get a lot better answers.
>
> Most people here don't write search engines nor do they have any inkling
> about how to prioritize results. It's a lot more complicated than just
> counting the number of times a word occurs.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================

Gordon - thanks, I will look in to that. I didn't realise that
FULLTEXT ranked the results, thats why I always used LIKE as it seemed
to give more results. I will look in to that.

Jerry - appreciate your point, but implementing search functionality
on a website is a pretty common task, and I would imagine a lot of
people here have some experience with it. I think the people here are
smarter than you give them credit for :)

Posted by Jerry Stuckle on June 11, 2008, 7:29 am
Please log in for more thread options
Joe wrote:
>> Joe wrote:
>>> I am trying to improve the quality of search results when a visitor
>>> enters a search term, and I am interested in any algorithms you guys
>>> use and have success with. Currently I do the following:
>>> 1) Break the term in to individual words.
>>> 2) Perform SQL DB search on individual words using LIKE '%term%'
>>> 3) Loop through all results counting how many occurances of the terms
>>> 4) order the results from high to low count.
>>> 5) display the results in that order
>>> This is better than just searching SQL and dumping, however its still
>>> pretty basic. Any thoughts or ideas?
>> And your PHP question is?
>>
>> I'd suggest you find a more appropriate newsgroup - one that knows about
>> search engines. You'll get a lot better answers.
>>
>> Most people here don't write search engines nor do they have any inkling
>> about how to prioritize results. It's a lot more complicated than just
>> counting the number of times a word occurs.
>>
>> --
>> ==================
>> Remove the "x" from my email address
>> Jerry Stuckle
>> JDS Computer Training Corp.
>> jstuck...@attglobal.net
>> ==================
>
> Gordon - thanks, I will look in to that. I didn't realise that
> FULLTEXT ranked the results, thats why I always used LIKE as it seemed
> to give more results. I will look in to that.
>
> Jerry - appreciate your point, but implementing search functionality
> on a website is a pretty common task, and I would imagine a lot of
> people here have some experience with it. I think the people here are
> smarter than you give them credit for :)
>

No, it is not a pretty common task. And very few people here have any
experience with it. And those who do use something like Google Search -
unless they use a CMS.

This isn't about them being smart. It's about not wasting time on doing
things which have already been done.

And in case you didn't notice - this is comp.lang.PHP. You aren't
asking a PHP question - you're asking a search engine question. You
will get much better answers in the appropriate newsgroup.

Or maybe you just figure you're one of those idiots who can ask any
question he wants in any newsgroup - despite the agreed upon charter for
that newsgroup.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================


Posted by Joe on June 11, 2008, 7:41 am
Please log in for more thread options
> Joe wrote:
> >> Joe wrote:
> >>> I am trying to improve the quality of search results when a visitor
> >>> enters a search term, and I am interested in any algorithms you guys
> >>> use and have success with. Currently I do the following:
> >>> 1) Break the term in to individual words.
> >>> 2) Perform SQL DB search on individual words using LIKE '%term%'
> >>> 3) Loop through all results counting how many occurances of the terms
> >>> 4) order the results from high to low count.
> >>> 5) display the results in that order
> >>> This is better than just searching SQL and dumping, however its still
> >>> pretty basic. Any thoughts or ideas?
> >> And your PHP question is?
>
> >> I'd suggest you find a more appropriate newsgroup - one that knows about
> >> search engines. You'll get a lot better answers.
>
> >> Most people here don't write search engines nor do they have any inkling
> >> about how to prioritize results. It's a lot more complicated than just
> >> counting the number of times a word occurs.
>
> >> --
> >> ==================
> >> Remove the "x" from my email address
> >> Jerry Stuckle
> >> JDS Computer Training Corp.
> >> jstuck...@attglobal.net
> >> ==================
>
> > Gordon - thanks, I will look in to that. I didn't realise that
> > FULLTEXT ranked the results, thats why I always used LIKE as it seemed
> > to give more results. I will look in to that.
>
> > Jerry - appreciate your point, but implementing search functionality
> > on a website is a pretty common task, and I would imagine a lot of
> > people here have some experience with it. I think the people here are
> > smarter than you give them credit for :)
>
> No, it is not a pretty common task. And very few people here have any
> experience with it. And those who do use something like Google Search -
> unless they use a CMS.
>
> This isn't about them being smart. It's about not wasting time on doing
> things which have already been done.
>
> And in case you didn't notice - this is comp.lang.PHP. You aren't
> asking a PHP question - you're asking a search engine question. You
> will get much better answers in the appropriate newsgroup.
>
> Or maybe you just figure you're one of those idiots who can ask any
> question he wants in any newsgroup - despite the agreed upon charter for
> that newsgroup.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================

Perhaps you are misunderstanding what I mean by search engine... I
only mean for searching the content of a single website, for example
search for the word 'bacon' in all pages on my website. Pretty much
every PHP website I've ever made contains this functionality. And just
for the record, a google search embedded in your website is a cop-
out.

But now we are definitely off topic, so unless anyone else has
anything 'constructive' to add, I'll ask the question elsewhere as my
good man Jerry suggests.

Similar ThreadsPosted
Advanced seo services help to get higher ranking in major search engine May 28, 2008, 12:32 pm
Search Result help July 12, 2004, 5:15 pm
Get result from Google search November 26, 2008, 8:44 am
mysql search close result July 20, 2005, 2:10 pm
how to save an php search result page in an php? May 24, 2006, 10:02 am
Search page result links July 6, 2006, 2:45 pm
How to sort the search-result of ldap? August 7, 2007, 10:22 am
a search script to search all our pages - including dynamic ones September 26, 2006, 7:39 am
"Specialized Search Engines" along with Google Search Capability September 13, 2007, 12:26 pm
ranking list April 7, 2005, 10:27 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap