Search code examples
searchmoduleexpressionengine

ExpressionEngine -> Search Module Issues


We’ve been having a lot of problems with our search module functionality.

This is the tag:

{exp:search:simple_form channel="courses|static_courses|courses_general|online_courses" no_result_page="search/noresults" status="open" search_in="everywhere" where="exact"}
<input type="text" name="keywords" id="keywords" value="Search NA" class="mr10" 'Search NA')"/>
<input type="hidden" name="orderby" value="title"/>
<input type="hidden" name="sort_order" value="asc"/>
<input type="submit" class="darkBtn" value="SEARCH"/>
{/exp:search:simple_form} 

If I set where=“any”, it brings up a whole lot of results but most of them don’t have a single one of the search terms on the page.
If I set where=“all”, it NEVER shows any results.
If I set where=“exact” it sometimes brings up the full search term but not always.

Any ideas as to what I need to look for?


Solution

  • where="all" is the parameter I use most often. It's what most people would be used to in terms of search syntax.

    If you're not getting any results, here are a couple of things to check:

    • make sure all of your channel fields are set to be searchable on their field settings screens
    • make sure the entries you're expecting results from are not set to custom statuses, or future-dated (in those cases you'd need to add status="not closed" and show_future_entries="yes" and/or show_expired="yes")
    • if you're using third-party fieldtypes, look into what they actually store in the exp_channel_data table fields (they may output your data on the front-end, but that data may be stored in a third-party database table, or otherwise encoded, making it invisible to the Search module)