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

Extension Hooks

Use this hook to check incoming data after a Low Search form was submitted, and optionally change it.

Arguments

  • $data (array) — the combined GET and POST data.

Return

The (modified) array of data.

$data = ee()->extensions->call('low_search_catch_search', $data);
if (ee()->extensions->end_script === TRUE) return;

low_search_channel_entries (v3.1.0)

Use this hook to use your own channel:entries method to parse the search results tagdata, available in the global TMPL object.

Arguments

NULL

Return

The parsed tagdata as a string or FALSE if you want to fall back to the default method.

if (ee()->extensions->active_hook('low_search_channel_entries') === TRUE)
{
  $tagdata = ee()->extensions->call('low_search_channel_entries');
}

low_search_excerpt (v2.2.0)

Use this hook to change the excerpt data.

Arguments

  • $entry_ids (array) — all the entry IDs of the entries about to be displayed.
  • $row (array) — the entry details of the current entry.
  • $field_id (int) — the field ID to be used for the excerpt.

Return

A string containing the excerpt data or an array containing the excerpt data and a boolean. If an array is given and the second item is FALSE, Low Search will use the given excerpt as is, without truncating or highlighting the keywords.

$str = ee()->extensions->call('low_search_excerpt', $entry_ids, $row, $field_id);

low_search_get_index_entries (v4.0.0)

Use this hook to get the entries that need to be indexed. The collection details contain the channel ID and settings, which in turn contain the fields (and weight) to get. The keys in $col['settings'] are the field IDs, including 0 for the title and a format of x:y where x is the category group ID and y is the category field.

Arguments

  • $col (array) — The collection details.
  • $entry_ids (array) — Optional amount of entry IDs that you need to get.

Return

An array containing the entry rows you queried. Per row, it will expect at least an entry_id. These entries will then be processed and added/updated to the search index.

$entries = ee()->extensions->call('low_search_get_index_entries', $col, $entry_ids);

low_search_modify_score (v2.3.0)

Use this hook to modify the score of the search results.

Arguments

  • $results (array) — Contains the entry ID as key and current score as value.

Return

An array containing the entry IDs as keys and new scores as values. If the array is empty, it will trigger No Results.

$results = ee()->extensions->call('low_search_modify_score', $results);

low_search_post_replace (v2.0.0)

Use this hook to perform extra processing after the values of the Find & Replace action is performed, like clearing cache.

Arguments

  • $entry_ids (array) — entry ids of the entries that were affected.
ee()->extensions->call('low_search_post_replace', $entry_ids);

low_search_post_search (v2.2.0)

Use this hook to change any of the search parameters after the search is executed.

Arguments

  • $params (array) — the parameters initially loaded.

Return

The (modified) array of parameters.

$params = ee()->extensions->call('low_search_post_search', $params);
if (ee()->extensions->end_script === TRUE) return ee()->TMPL->tagdata;

Use this hook to change any of the search parameters before the search is executed.

Arguments

  • $params (array) — the parameters initially loaded.

Return

The (modified) array of parameters. Adding a key keywords-query:table_column will add its value to the where-clause of the keyword search. For example: $params['keywords-query:entry_id'] = '1';. It allows for multiple items.

$params = ee()->extensions->call('low_search_pre_search', $params);
if (ee()->extensions->end_script === TRUE) return ee()->TMPL->tagdata;

low_search_update_index (v2.2.0)

Use this hook to change the index data for entries.

Arguments

  • $data (array) — the data to be inserted/updated.
  • $entry (array) — the channel entry associated with this data.

Return

The (modified) array of data.

$ext_data = ee()->extensions->call('low_search_update_index', $data, $entry);

if (is_array($ext_data) && ! empty($ext_data))
{
  $data = array_merge($data, $ext_data);
}

low_search_update_lexicon (v4.2.0)

Use this hook to change the lexicon data before it is inserted.

Arguments

  • $data (array) — the data to be inserted.

Return

The (modified) array of data.

$ext_data = ee()->extensions->call('low_search_update_lexicon', $data, $entry);

if (is_array($ext_data) && ! empty($ext_data))
{
  $data = array_merge($data, $ext_data);
}