Manipulate search results


https://forum.kartris.com/Topic1463.aspx
Print Topic | Close Window

By TheCalicoTree - Tue 29 Nov 2011
We need to be able to manipulate the order in which search results are displayed so that we can select which products display first.  I m thinking of using the Strapline field to enter in multiple keywords and then use CSS to turn off the display of the strapline.

Not ideal but am wondering if anyone has a better solution?

Thanks

Helen
By Paul - Wed 30 Nov 2011
It's a tricky business manipulating the order, since each search is different. The order is determined at present by various factors (the code itself is in the search stored procedured).

Boosting particular products for a particular search is largely down to having them better match the keywords and phrases that people might search for. You probably don't want to just boost particular products for any search (not that there is an easy way to do this at present), if it means them coming up higher in searches where they're not relevant.

What you will find is that the search ranks results higher that match the input phrase exactly over ones that contain all the words and ones which contain one of the words. So for example:

power drill

Will match results that contain 'power' and 'drill', but ones that contain the term 'power drill' earn extra points that tends to rank them higher

Words in the product name score more than words in other fields. This scoring is perhaps rather simplistic compared to something like Google. But since it is internal within a store, it's not really open to being gamed or abused in quite the same way, since all the content being searched is added by the store owner, so spamming up one product would be to the detriment of others of your own products (though if you want to shift something this might be worth doing).
By TheCalicoTree - Mon 5 Dec 2011
Thanks for the reply and the explanation.

In our example we have 10 different types of soap. We would prefer our best sellers to appear at the top of the search results.  As each product is limited to the number of times we can realistically mention the keyword soap we were thinking of using the strapline and then turning off the display of that field through CSS.  Does the stored procedure search the strapline field?
By Mohammad - Mon 5 Dec 2011
Product's strapline is not included in the search (by default), but you can add it as searchable field,  to do that, simply find/replace "LE_FieldID IN (1,2)" in your search stored procedure by "LE_FieldID IN (1,2,7)"

But if you want to change how the ranks given to results, its a tricky one!, you will need to study the search stored procedure in order to be able to play with the ranking formulas.
By TheCalicoTree - Tue 7 Feb 2012
I've been studying the search query and I think I have found a problem. We changed the query to use strapline which is working but it seemed that the description field was being overlooked.

I have followed the code and interrogated data at various points and it seems to me as though tblKartrisLanguageElements  is not being populated with description data. Indeed when I query the table

SELECT count(*) FROM       tblKartrisLanguageElements
        WHERE   
        LE_FieldID = 2

the result is 1783. Only 514 of these records have  LE_VALUE data. These all seem to be category descriptions.

Forgive me if I've misunderstood the process but should there not be data in here? Could it be possible that the admin tool is not passing product description data through to this table?