Page 1 of 1

Searching -- Like ebay

Posted: Thu Jul 20, 2006 11:48 am
by tecktalkcm0391
How does ebay do the search for your category where if you type hello in it returns:
Categories: select up to two for your listing % item match


Collectibles > Animation Art, Characters > Japanese, Anime > Sanrio, Hello Kitty > Hello Kitty > Other Items 36%

Collectibles > Animation Art, Characters > Japanese, Anime > Other Japanese, Anime 9%

Music > CDs 8%

Toys & Hobbies > TV, Movie, Character Toys > Hello Kitty > Other 9%

Clothing, Shoes & Accessories > Women's Accessories, Handbags > Handbags, Bags 6%

Collectibles > Animation Art, Characters > Animation Characters > Hello Kitty 6%

DVDs & Movies > DVD & HD DVD 5%

Books > Children's Books 4%

Posted: Thu Jul 20, 2006 11:57 am
by Benjamin
By the looks of your results it would appear that it categories containing the keyword your searching for are weighted higher.

Posted: Thu Jul 20, 2006 12:47 pm
by tecktalkcm0391
Ok, well how could I do something like that?

Posted: Thu Jul 20, 2006 12:48 pm
by Luke
search engines are complicated beasts man... VERY complicated. (Yes I realize this doesn't really help you)

EDIT: Oh and are you PM and AIM links hotlines?

Posted: Thu Jul 20, 2006 1:44 pm
by Ward
I dont think it could be done in pure SQL. This is off the top of my head, but heres what I'm thinking:

1. Search for items containing the keyword searched for

2. Count the total number of keywords found in all results

3. Divide each items keyword count by the total keyword count, to find it's percentage.

This would be a very simple method for sorting by relevancy, and I'm sure ebay has a much more complicated method.

Posted: Thu Jul 20, 2006 1:46 pm
by RobertGonzalez
I think there system uses an algorithm designed to weigh certain words against other words. They are graded, then reuslts are returned in order of grade. I am not sure this is a SQL capable task.