BigCommerce - Hosted Ecommerce Software by Interspire

Interspire Forum

 
Go Back   Interspire Forum > Interspire Knowledge Manager Community Forum > Customization and Integration

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-29-2011, 09:25 PM
nedit + nedit is offline
Interspire Customer
 
Join Date: Dec 2011
Posts: 6
Default mysql search algorithm revelance "fix"

We had a problem where search results were sorted by nothing more than last update date.

Using boolean - fulltext search I was able to make the following changes to get it working as I think it was intended.


--class.search.parent.php--
inside the questFullTextSearch function:

comment this out (line ~58)
$orderBy = ' q.questionid ';

update this (line ~87)
$orderBy = ' score DESC , '. $orderBy;
to
$orderBy = ' score DESC ';

uncomment and change this line (line ~409)
//$query .= "\n ORDER BY $orderBy DESC ";
to
$query .= "\n ORDER BY $orderBy ";

comment out this line (line ~410)
$query .= "\n ORDER BY lastupdated DESC ";


That should get your search working a lot better. Without these changes it really doesn't work at all with mysql.


I went a step further and added a preference that articles with search words in the title were given preference in sort order. I can post those steps too if anyone is interested.
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump