Jump to content

I've got a really hard one!


jk11uk

Recommended Posts

(ehem, php question that is)

 

I have a search indexing script that puts a weighting to each of the words in an item (item has title, body text and tags) and puts these in a database as:

 

id

item_id

word

weight

 

So, when someone types in a search phrase i need to:

split the phrase up into words

search the words database for each of the search phrase words and return a top 10 set of item IDs, each of which should also have a weighting score ('weight' from the database)

then when this is done for all search words, all of the weightings for unique IDs are added up and then the list of items is displayed, ordered by total score (weightings added up)

 

 

any genius help out?

 

 

thanks very much in advance

 

Link to comment
https://forums.phpfreaks.com/topic/102468-ive-got-a-really-hard-one/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.