All Low add-ons are now owned by EEHarbor. Read the blog post.
All add-ons

Low Search

Just $89.00 per license

Compatibility: EE2, EE3, EE4, EE5
Latest release: 6.2.1 (released 2020-06-16)
Licensing: Commercial License Agreement

Form Tag

Use the Form tag to create search forms. Search parameters made available by each Filter should be used as input fields (most commonly <input> and <select> elements) and can be either hidden or visible for the user.

{exp:low_search:form result_page="search"}
  <fieldset>
    <label for="keywords">Keywords</label>
    <input type="search" name="keywords" id="keywords" />
    <button type="submit">Search</button>
  </fieldset>
{/exp:low_search:form}
Parameters for the low_search:form tag
Parameter Description
force_protocol Set to http or https to force the protocol of the generated search results URL.
force_shortcut Set to no to have a given query overwrite a valid shortcut. Defaults to yes (a shortcut will overwrite the query).
form_attribute Specifies any html attribute you want the form to have. For example: form_id="search" will add id="search" to the <form> tag.
query Use this parameter to pass through a previously executed encoded search query. Not needed when not encoding queries.
required Set to one or more parameter names to make that parameter a required field.
remember Set to the names of the parameters you want to pass through to the next search without having input fields for them in the form.
remember_shortcut Set to yes to remember the given shortcut’s parameters without having input fields for them.
result_page The Template_Group/Template where you would like the search results to be shown. If the parameter starts with http:// or https://, that URL will be used as the result page. You can optionally use %s to place the encoded search query anywhere in the URI. Defaults to the value set in your Settings.
shortcut Name of the shortcut to use for the search query.
Variables for the low_search:form tag
Variable Description
{collections}{/collections} Displays all search collections for current site. Available parameters:
  • lang: only display collections for given language(s).
  • show: only display collections for given name(s) or ID(s).

Available variables:
  • {collection_id}
  • {collection_name}
  • {collection_label}
  • {collection_language}
  • {collection_count}
  • {total_collections}
  • {collection_is_active}
{error_message} Will display an error message if something went wrong with the search.
{low_search_shortcut_id} The shortcut ID used, if applicable.
{low_search_shortcut_label} The shortcut label used, if applicable.
{low_search_shortcut_name} The shortcut name used, if applicable.
{low_search_parameter_missing} Use in conditionals to display error messages.
{low_search:url} Short syntax for the URL tag. When used, it will automatically inherit the query set in the parent tag.

Filters Tag

The Filters tag works identically to the Form tag, without generating a search form. Use it to show search filters anywhere on your page or to create a list of URL tags in short syntax. The following example shows a list of one-click filters to refine search results:

{exp:low_search:filters query="{segment_3}"}
  {exp:channel:categories channel="entries" style="linear"}
    {if count ==  1}<ul>{/if}
      <li>
        <a href="{low_search:url toggle:category="{category_id}"}">{category_name}</a>
        {if low_search_category ~ '/(^|\|)'.category_id.'($|\|)/'}&check;{/if}
      </li>
    {if count == total_results}</ul>{/if}
  {/exp:channel:categories}
{/exp:low_search:filters}

Note: the above example contains a conditional using the Maches Operator introduced in EE 2.9.0. If you’re using an older version of ExpressionEngine, you can use the IN conditionals instead.

Results Tag

{exp:low_search:results query="{segment_3}" limit="10"}
  {if count ==  1}<ol>{/if}
    <li><a href="{comment_url_title_auto_path}">{title}</a></li>
  {if count == total_results}</ol>{/if}
  {if no_results}No search results{/if}
{/exp:low_search:results}

The Results tag supports all parameters from the native channel:entries tag and parameters made available by the Filters. In addition to those, the following parameters are available. Any parameters set will override the ones in the given query.

Additional parameters for the Results tag
Parameter Description
alias:parameter Point a given parameter to any other, so parameter x gets treated like parameter y. For example, to use the param q as an alias for keywords, use alias:keywords="q".
default:parameter Set the default value of any parameter. This value will be overwritten when the parameter is present in the search query.
disable In addition to the native values, the disable parameter allows you to disable filters per Results tag. Use the low_search:filter_name format: for example, disable="low_search:field_search" will disable Low Search’s Field Search filter. (since v6.2.0)
exclude Set to one or more parameter names to exclude their values.
force_shortcut Set to no to have a given query overwrite a valid shortcut. Defaults to yes (a shortcut will overwrite the query).
log_search Set to yes to explicitly log the search on the first page of the search results. By default, searches are already logged if you’re using the search form, so only use this when you’re bypassing that.
orderby_sort Combines the native orderby and sort parameters. Separate field and sort order with a |. For example: title|asc.
query Use this parameter to pass through the encoded search query, which is present in the search results URI. You can override any of its settings by hard-coding the other Low Search parameters. Note that any of the hard-coded query parameters will not be reflected in the Search Log. Not needed when not encoding queries.
require_all Set to one or more parameter names to have their values treated as an inclusive stack.
require_query Set to yes to trigger No Results when no (encoded) query is given. Otherwise all entries will be returned.
require_shortcut Set to yes to trigger No Results when no (valid) shortcut is given.
shortcut Name of the shortcut to use for the search query.

The Results tag supports all variables from the native channel:entries tag and variables made available by the Filters. In addition to those, the following variables are available.

Additional variables for the Results tag
Variable Description
{auto_path} The URL of the entry, based on the Search Results URL setting of that entry’s Channel preferences. See also the native Search module.
{low_search_excerpt} The search excerpt as defined in the collection settings, or as defined in the Channel preferences for keyword-less searches.
{low_search_query_string} This contains the current Query String, when not encoding queries.
{low_search_shortcut_id} The shortcut ID used, if applicable.
{low_search_shortcut_label} The shortcut label used, if applicable.
{low_search_shortcut_name} The shortcut name used, if applicable.
{if low_search_no_results}{/if} Alternative syntax for the native {if no_results}{/if} conditional.

Shortcuts Tag

Use this to display a list of Shortcuts.

{exp:low_search:shortcuts group_id="1"}
  {if count == 1}<ul>{/if}
    <li><a href="{path="search/{shortcut_name}"}">{shortcut_label}</a></li>
  {if count == total_results}</ul>{/if}
{/exp:low_search:shortcuts}
Parameters for the Shortcuts tag
Parameter Description
group_id Limit shortcuts by given group ID.
limit Maximum amount of shortcuts to display.
offset Offset the output of shortcuts by this amount.
orderby Field to order the shortcuts by. Defaults by the order in their group.
shortcut_id Limit shortcuts by given IDs.
shortcut_name Limit shortcuts by given names.
Variables for the Shortcuts tag
Variable Description
{count} The shortcut count.
{shortcut_id} The shortcut ID.
{shortcut_label} The shortcut label.
{shortcut_name} The shortcut name.
{shortcut_url} The full search URL for this shortcut. You can override any of the shortcut’s parameters by setting parameters to this variable, eg. {shortcut_url result_page="search/results"}
{total_results} The total amount of shortcuts displayed.

Save Tag

Use this tag to generate a form to save a given search query as a shortcut. The form will need input fields for shortcut_name and shortcut_label values.

{exp:low_search:save query="{segment_3}" group_id="1"}
  <fieldset>
    <input name="shortcut_name" placeholder="Name" />
    <input name="shortcut_label" placeholder="Label" />
    <button type="submit">Save</button>
  </fieldset>
{/exp:low_search:save}
Parameters for the Save tag
Parameter Description
form_attribute Specifies any html attribute you want the form to have. For example: form_id="save" will add id="save" to the <form> tag.
group_id Group ID the shortcut needs to be saved to. Required.
query The encoded search query to save. Not needed when not encoding queries.

URL Tag

Use this single tag to produce a search url you can use for bookmarking or quick linking.

{exp:low_search:url keywords="foo"}

When used inside the Form or Filters tag, you can also use the shortcut syntax. Using the shortcut will inherit all the parameters set in the parent tag. You can use any of the parameters used in the Results tag. In addition to that, these parameters are available:

Additional parameters for the low_search:url tag
Parameter Description
encode Set to no to generate a human-readable url. Visiting this URL will add the search query to the search log.
query The encoded search query to inherit. Not needed when not encoding queries, as this will happen automatically. Use the reset parameter to cancel this behaviour.
reset Set to yes to not inherit the current query.
result_page The group/template you want to link to, like in the Form tag.
toggle:parameter Toggles a single value in the given query. If the parameter value isn’t present in the current query, it generates a URL where the value is present, and vice versa.

Param Tag

Use this tag to output a given parameter value outside of the Form, Filters or Results tag. You can also loop through multi-valued parameters.

{exp:low_search:param get="keywords" query="{segment_3}"}
{exp:low_search:param:loop get="category" as="cat_id" query="{segment_3}"}
  {cat_id}
{/exp:low_search:param:loop}
Additional parameters for the low_search:param tag
Parameter Description
get Parameter name you are targeting. Required.
query The encoded query where the parameter is present. Required when encoding queries.
as When outputting the values in a loop, use this parameter to set the variable name used in the loop. Required when looping values.
format Set to raw for unaltered output, set to url for url-encoded output. Defaults to html-safe output.

Use this tag to display a list of popular keywords. The Search Log must be enabled for this tag to work properly.

{exp:low_search:popular limit="10"}
  {if count == 1}<ul>{/if}
    <li>{keywords}: {search_count}</li>
  {if count == total_results}</ul>{/if}
{/exp:low_search:popular}

Keywords Tag

Use this single tag to display the keywords used in a given search query. It is a shortcut for the Param tag.

{exp:low_search:keywords query="{segment_3}"}

Collections Tag

Use this tag to display a list of search collections.

{exp:low_search:collections}
  {if count == 1}<ul>{/if}
    <li>{collection_label}</li>
  {if count == total_results}</ul>{/if}
{/exp:low_search:collections}
Parameters for the low_search:collections tag
Parameter Description
collection Limit collections by names or IDs given.
collection_lang Limit collections by their language code.
Variables for the low_search:collections tag
Variable Description
{collection_id} The collection ID.
{collection_name} The collection name.
{collection_label} The collection label.
{collection_language} The collection language.

Suggestions Tag

Use this tag to display a list of suggestions based on given keywords, language, and the words currently present in the lexicon. It uses either Levenshtein distance or Soundex similarity (phonetics) to determine the suggestions.

{exp:low_search:suggestions keywords="jongle" keywords:lang="en" limit="1"}
  Did you mean {suggestion}?
  {if no_suggestions}No suggestions found.{/if}
{/exp:low_search:suggestions}
Parameters for the low_search:suggestions tag
Parameter Description
distance Depending on the method used, either the maximum Levenshtein distance or maximum Soundex word length distance from the original. Either 1, 2 or 3; defaults to 2.
keywords The keywords on which to base the suggestions. Overrides any keywords given in the query.
keywords:lang The language of the keywords on which to base the suggestions. Should point to the lexicon language. Overrides the language given in the query.
limit Maximum number of suggestions to return. Defaults to 5.
method The method used for getting the suggestions, either levenshtein or soundex. Defaults to the former.
query The query that contains the keywords and/or keywords:lang parameters on which to base the suggestions.

Note: Using Soundex for generating suggestions is only effective for languages with a latin-based alphabet. The Levenshtein method works regardless of alphabet type.

Variables for the low_search:suggestions tag
Variable Description
{suggestion} The suggested word in lowercase.
{suggestion:upper} The suggested word in uppercase.
{suggestion:ucfirst} The suggested word with the first letter in uppercase.
{suggestion_count} The count of the current suggestion.
{total_suggestions} The total amount of suggestions given.
{if no_suggestions}{/if} Alternative syntax for the native {if no_results}{/if} conditional.