Google-Like Search

6 posts by 2 authors in: Forums > CMS Builder
Last Post: August 1, 2012   (RSS)

I decided to use a Google-like search engine on a customer's website (see attached file). It works great, except when it gets to detail pages. Its obvious why, as it searches the web site files and not the cmsb database tables.

My client really likes this google-like search. Is there any way I can include the detail pages (ie the database tables) in the search?

Ragi
--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke
Attachments:

websearch_script.html 10K

Re: [Jason] Google-Like Search

Hi Jason: unfortunately, it looks like it will be complicated to adapt this search script to cmsb. The website I am looking to "search" has around 40 section editors, so I'm not sure what would be the easiest way to implement a search engine.

Any suggestions?

Ragi
--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

Re: [northernpenguin] Google-Like Search

By Jason - July 31, 2012

Hi,

One option would be to use the multi-search option in CMS Builder. For more information on this, take a look at this post:
http://www.interactivetools.com/forum/gforum.cgi?post=61466#61466

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Google-Like Search

By northernpenguin - July 31, 2012 - edited: July 31, 2012

Jason: using the
multisearch.php
file, I would have to define every table in my website that I want searched as follows:
$searchTables['news'] = array(
'viewerUrl' => 'newsPage.php',
'titleField' => 'title',
'summaryField' => 'summary',
'searchFields' => array('title','summary','content'),
);


Is this correct?

Also, I want to add a reset button to clear the search area. I tried <input type="reset" name="mybutton" value="Clear">, but it does nothing. Any ideas?
--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

Re: [northernpenguin] Google-Like Search

By Jason - August 1, 2012

Hi,

Yes, you'll need to define a $searchTables array for each CMS Builder section you want to search.

For your reset button, the code looks right. Make sure the code is inside the <form></form> tags.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/