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 not working properly

September 29, 2014 10:18am

Subscribe [2]
  • #1 / Sep 29, 2014 10:18am

    javier vilchis

    9 posts

    Simple search is not looking for every word in the search field. It sometimes works and other times does not. Here is the code:

    {exp:search:simple_form channel="faq" search_in="everywhere" show_expired="yes" show_future_entries="yes" status="open" where="all" result_page="search/index" no_result_page="search/no-results"}
        <input type="text" name="keywords" id="keywords" value="" placeholder="What is…" class="input" />
        <input type="submit" value="Go" class="btn" />
        {/exp:search:simple_form}

    I need help, I have changed where=“everywhere” where=“all” and nothing.

    an example is if I type: The lost world
    it will not return anything. However, if I type world, it will return an entry with that name.

  • #2 / Sep 29, 2014 12:53pm

    Boyink!

    5011 posts

    Whether a field is searchable or not is a per-field setting that defaults to no. Have you checked to make sure all fields are set to be searchable?

    Also make sure you understand the difference between where=“any” and where=“all” (I wasn’t clear if you did because where=“everywhere” is not a valid option).

  • #3 / Sep 29, 2014 3:16pm

    javier vilchis

    9 posts

    I’ve checked the field settings and it is set to search = true. I’ve gone to this page https://ellislab.com/expressionengine/user-guide/add-ons/search/simple.html and looked at the where= parameter. I tested the form again and nothing, it is still the same. I can type one word and gives me what I want. However, if I type the same word within a sentence it will return not found.  any ideas?

    {exp:search:simple_form channel="faq" where="all" result_page="search/index" no_result_page="search/no-results"}
    <input type="text" name="keywords" id="keywords" value="" placeholder="What is…" class="input" />
    <input type="submit" value="Go" class="btn" />
    {/exp:search:simple_form}
  • #4 / Sep 29, 2014 3:47pm

    Boyink!

    5011 posts

    If it were me I’d either…

    a) Set it back to “where=“any” and remember it’s simple search that comes in the box with a $300 CMS or
    b) Use one of the available search add-ons for better results.

  • #5 / Sep 29, 2014 3:52pm

    javier vilchis

    9 posts

    Thanks for the tips. What is funny, I have other installs where the form works like a charm with the same settings. I guess this is that one time when it will not work.  Thanks again! 😊

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

ExpressionEngine News!

#eecms, #events, #releases