Bad Search Results!

5 posts by 2 authors in: Forums > CMS Builder
Last Post: February 1, 2016   (RSS)

Hello, All -

I have a bit of an embarrassing situation. I have just shown my latest client the first stage of her new website. She promptly plowed through it with the kind of diligence you would normally associate with a tax inspector. To my relief  she then went on to tell me how satisfied she was - apart from one small thing...

The search engine is returning records which do not contain the search word!

I was rather indignant as I've never known the CMSB search engine to fail me before. Unfortunately, she is absolutely right!

My search code is based on the searchMultipleTables apprroach:

<?php
  require_once "cmsb/lib/viewer_functions.php";
  $searchOptions = array();

  $search_string = @$_REQUEST['q'];


$searchOptions['keywords'] = $search_string;
$searchOptions['perPage']  = "10";
$searchOptions['debugSql'] = "0";



$searchTables['pages'] = array(
  'viewerUrl'       => 'index.php',
  'titleField'      => 'name',
  'summaryField'    => 'content',
  'field3'          => 'permalink',
  'searchFields'    =>  array('name','content'),
);


      list($searchRows, $searchDetails) = searchMultipleTables($searchTables, $searchOptions);
?>

My client is very big on "communications". When she searches for the word CMSB returns about 9 pages - but only half of them contain the word.

The only thing that might be a factor is that the URL of the site also contains the word "communications". Could this be skewing the results?

Otherwise I cannot explain the problem at all.

:0/

Perch - Embarrassed in England!

By ross - January 29, 2016

Hi Perch

I have a couple things for you to try.

First, in CMS Builder's admin do a search for "Communications" right in the section itself to see if any records show up that way.

Second, turn on debugSql so you can see exactly what query is being run on by the search.

Neither of these are the "solution" but should help narrow things down.

Let me know how you make out.

Thanks!

-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

By ross - January 29, 2016

Hi Perch

I have a couple things for you to try.

First, in CMS Builder's admin do a search for "Communications" right in the section itself to see if any records show up that way.

Second, turn on debugSql so you can see exactly what query is being run on by the search.

Neither of these are the "solution" but should help narrow things down.

Let me know how you make out.

Thanks!

-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

By ross - February 1, 2016

Hi Perch

CMS Builder is only going to search what's in the database. If the mailto email is only in the HTML on the page itself, that won't be the problem.

When you do the same search in CMS Builder, do you get the same results?

-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/