Jump to content

Relevant Search


Guest dazza100

Recommended Posts

Guest dazza100

HI

I have over 1500 products, currently if a customer’s searches for - False nails. 26 pages of result are shown and the first page does not contain any false nails. The first page will show products with just one of the searched words.

There has to be a way to make this more relevant.

Can anyone help?

Thanks

Daz

Link to comment
Share on other sites

  • 4 weeks later...

Guest jazzydan58

I have the same problem, the search seems to pick up nearly everything on the site which makes it pointless how can I restrict it?

Link to comment
Share on other sites

Guest asafisk

Hi,

I think the following code is to blame:

file: includes/content/viewCat.inc.php;

line: around 182;

		if (!empty($_REQUEST['searchStr'])) {

			if (empty($orderSort)) {

				$orderSort = ' ORDER BY SearchScore DESC';

			}




Back up the file first, then change the code above to this:


		if (!empty($_REQUEST['searchStr'])) {

			if (empty($_REQUEST['sort_order'])) {

				$orderSort = ' ORDER BY SearchScore DESC';

			}

What's happening is the page is checking to see if a sort order ($orderSort) has already been defined. If not, then it uses the SearchScore in Descending order. Except $orderSort is always defined so we check for a $_REQUEST parameter instead. Now when you run a search and the sort order is not already defined you will see results by relevance.

...I hope :)

Good luck.

Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...

Hi,

I think the following code is to blame:

file: includes/content/viewCat.inc.php;

line: around 182;

Error Message:

1054: Unknown column 'SearchScore' in 'order clause'

SQL:

SELECT DISTINCT(I.productId), I.* FROM CubeCart_inventory AS I, CubeCart_category AS C WHERE (I.name LIKE '%aramis900%'

OR I.description LIKE '%aramis900%' OR I.productCode LIKE '%aramis900%') AND C.cat_id > 0 AND C.cat_id = I.cat_id AND C.hide

= '0' AND (C.cat_desc != '##HIDDEN##' OR C.cat_desc IS NULL) AND I.disabled = '0' ORDER BY SearchScore DESC

Can somebody help me to fix this ?

Link to comment
Share on other sites

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.   Paste as plain text instead

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