having trouble with search

5 posts by 2 authors in: Forums > CMS Builder
Last Post: March 9, 2012   (RSS)

By craig_bcd - March 8, 2012

I am having trouble with the keyword search not working right on this website: www.delanceyplace.com if you go to search archives and search the entire post for: monstrous popes and cardinals it says 0 results, or if you just search the title (which is what this is) also 0 results.

All searches in the form are "keyword searches" the general form is below.

However, if you traverse the archives you will see the post on 3/5/2012. I have no idea why it returns 0 results. Any help is appreciated.

Thanks

Craig

<form name="basic" action="dpsearch_results.php" method="post">
<table class="search_table">
<tr>
<td class="search_title">enter search terms:</td>
<td class="search_text"><input type="text" name="html_keyword" size="50px" /></td>
</tr>
<tr>
<td class="search_title"></td>
<td class="search_text"><input type="submit" value="Search" /></td>
</tr>
</table>
</form>

Re: [craig_bcd] having trouble with search

By Jason - March 9, 2012

Hi,

In your example, the html_keyword variable will search all your records for a record whose html field contains the entire phrase "monstrous popes and cardinals". That exact phrase would have to appear. If you wanted to find a record where all of the words are found in the html field, but not necessarily together, try changing keyword to query:

<tr>
<td class="search_title">enter search terms:</td>
<td class="search_text"><input type="text" name="html_query" size="50px" /></td>
</tr>


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: [craig_bcd] having trouble with search

By Jason - March 9, 2012

Hi,

The way you currently have your text field set up, it's only going to be searching against the html field. You'll need to list all the fields you want it to search, separated by commas, in the input field name.

For example, if you wanted it to search the title, html, and summary fields, you would name you input field like this:

<input type="text" name="title,html,summary_query" size="50px" />

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] having trouble with search

By craig_bcd - March 9, 2012

Works Jason - thanks for the help as always!