ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Simple search implementation not working

February 28, 2011 2:07am

Subscribe [3]
  • #1 / Feb 28, 2011 2:07am

    Nicolas E

    44 posts

    Hello guys!

    We moved this installation from another server and upgraded it from 1.6.7 to Version 2.1.3 Build 20101220
    However the search simply doesn’t work.
    Always get the “Your search did not return any results”

    I’m able to see the Search Log and it’s working perfectly (the log).
    I’m not using any kind of .htaccess

    I’ve created separate pages with the examples for the search and results pages.
    The pages are:
    Search: http://cliente.isa.com.co/index.php/search/search
    With this code:

    <html>
    <title>Search </title>
    <head> </head>
    <body>
    {exp:search:simple_form channel="news_articles" result_page="search/results"}
    <input type="text" name="keywords" value="">
    <input type="submit" value="Search" class="submit" /></p>
    {/exp:search:simple_form} 
    </body>
    </html>

    Results: http://cliente.isa.com.co/index.php/search/results
    With this code:

    <html>
    <title> </title>
    <head> </head>
    <body>
    table border="0" cellpadding="6" cellspacing="1" width="100%">
    
    <tr>
    
    <th>{lang:title}</th>
    
    <th>{lang:excerpt}</th>
    
    <th>{lang:author}</th>
    
    <th>{lang:date}</th>
    
    <th>{lang:total_comments}</th>
    
    <th>{lang:recent_comments}</th>
    
    </tr>
    
    
    
    {exp:search:search_results switch="resultRowOne|resultRowTwo"}
    
    
    
    <tr class="{switch}">
    
    <td width="30%" valign="top"><b><a href="http://{auto_path}">{title}</a></b></td>
    
    <td width="30%" valign="top">{excerpt}</td>
    
    <td width="10%" valign="top"><a href="http://{member_path=member/index}">{author}</a></td>
    
    <td width="10%" valign="top">{entry_date format="%m/%d/%y"}</td>
    
    <td width="10%" valign="top">{comment_total}</td>
    
    <td width="10%" valign="top">{recent_comment_date format="%m/%d/%y"}</td>
    
    </tr>
    
    
    
    {/exp:search:search_results}
    
    
    
    </table>
    
    
    
    {if paginate}
    
    
    
    <div class='paginate'>
    
    
    
    <span class='pagecount'>{page_count}</span>  {paginate}
    
    
    
    </div>
    
    
    
    {/if}
    
    </body>
    </html>

    Our home page has a search box implemented in the top right at:
    http://cliente.isa.com.co/

    Your help is greatly appreciated,

    Waiting for your response,
    Best,

    Nicolas E.

  • #2 / Feb 28, 2011 9:16am

    Sue Crocker

    26054 posts

    Hi, Nicholas.

    Have you tried adding http://ellislab.com/expressionengine/user-guide/modules/search/simple.html#par_search_in

    search_in = “everywhere” ?

  • #3 / Feb 28, 2011 1:00pm

    Nicolas E

    44 posts

    Sue,

    Yes I did.
    Same error still.
    Let me know how to proceed,

    Best,

    Nicolas E.

  • #4 / Mar 01, 2011 3:05am

    John Henry Donovan

    12339 posts

    Nicholas,

    Can you make sure that the setting to make your custom fields searchable is turned on please. Each custom field will need to be checked


    Then try the following please

    {exp:search:simple_form channel="news_articles" result_page="search/results" status="not closed" search_in="everywhere"}
    <input type="text" name="keywords" id="keywords" maxlength="100" size="20" />
    <input type="submit" value="Search" class="submit" /></p>
    {/exp:search:simple_form}
  • #5 / Mar 01, 2011 10:13pm

    Nicolas E

    44 posts

    John,

    Thanks a lot!
    The status=“not closed” did the trick…

    Best,

    Nicolas E.

  • #6 / Mar 02, 2011 1:25pm

    Sue Crocker

    26054 posts

    Glad John was able to help. Don’t hesitate to post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases