Jump to content

Recommended Posts

Hi hope you smart people can help with this problem.

The search engine is for a product search website, its default preference is to search by most relevant.

This then will display the product like so

 

Product Title                Price

Description                          Image

links>> full description | sellers name << This is the problem

 

 

The problem we have with this is,

if we search for a product for example jeans and if one of the sellers is selling more than one type of jeans and in some cases they are selling up to 30 so the result we then have is one seller taking up the 1st 3 pages of the search result (max 10 products on each page),  then on the 4th page we are able to see products from the next seller and that list may also go on for 2 or 3 pages.

We have tried  The rand() function but then this messes up the relevancy of the search result.

 

So what we need is same way to randomize the seller name string while keeping the of the result relevancy.

 

 

Many thanks for you help with this.

Link to comment
https://forums.phpfreaks.com/topic/181473-php-search-engine-problem/
Share on other sites

I will give an Example:

if we search mp3 player and we have 50 mp3 products from apple and 50 from Creative ZEN in our database,

the result will then display the most relevant from one of these sellers lets say apple followed by the other 49 in a relevant order all from apple then  the 51st product will be from Creative ZEN followed by the other 49 from Creative ZEN.

 

Of course to make the site fair for the seller we cant have one sellers product taking up the 1st 3 to 5 pages of the result.

so instead of

the current result of:

apple

apple

apple

apple

apple

x50

then

Creative ZEN

Creative ZEN

Creative ZEN

Creative ZEN

x50

 

this is how we want the result:

apple

Creative ZEN

apple

Creative ZEN

apple

Creative ZEN

But of course keeping in the order of most relevant.

Ok so it just seems that your ordering the results by both name and revelance which is the incorrect method of producing a list like this. Would it be possible for you to post the php and sql your using for this? Im willing to help if I can.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.