You are here:  » Merchant grouping in search results

Support Forum



Merchant grouping in search results

Submitted by Rob Andrews on Thu, 2010-03-11 22:17 in

Hi David,

I think this one could be a MySQL thing, but I thought it was worth asking.

I am putting together a site that uses the script to show relevant results that are driven from the navigation e.g. click the 'blue widget' link and you get a selection of 'blue widgets'. For this reason I am using the BOOLEAN variation of the search script because I want the results to be pretty specific. I am doing this through searching the product name and brand fields within the database.

The problem is the results for these searches seem to be grouping by merchant. For example if I had 60 results of 'blue widgets' then the results may be from 4 different merchants but would probably be in concurrent groups of 10 or so from the same merchant and then changing over (with some variaitions but usually in clumps of at least 5).

I guess this may just be how the FULLTEXT mode catches by relevancy and the order they are in the database, but is there any way to create more variation of order of produts by merchant? Also, if there were say 6 possible merchants for 'blue widgets' maybe two would not be covered or shown at all in the results (that I have limited to a maximum of around 60 results intentionally). Usually the trigger words would be included in many of the items in roughtly the same way e.g. most product names would have 'blue' in them and all would have 'widget' in the brand.

Is there a way of getting the relevancy a bit more random to show more and more mixed up merchants? I am not worried about relevancy loss because of the BOOLEAN approach, but a more mixed up order merchant wise would be great.

Thank you in advance,

Rob

Submitted by support on Fri, 2010-03-12 10:08

Hi Rob,

The Full Text search (as it stands in the code) only order by relevance because of the ORDER BY relevance clause (relevance is SELECT'ed as a virtual column using MATCH).

You could try simply removing the "ORDER BY relevance" clause from your custom SQL; otherwise replace with ORDER BY RAND() which may do the job...

Hope this helps!

Cheers,
David.

Submitted by Rob Andrews on Fri, 2010-03-12 14:30

Perfect David!

The 'ORDER BY RAND()' works really well and because of the BOOLEAN matching, relevance is fine right down to the last results.

Many thanks,

Rob