You are here

protected function SearchApiFacetapiAdapter::rememberSearchId in Search API 7

Adds a search ID to the list of known searches for an index.

Parameters

string $index_id: The machine name of the search index.

string $search_id: The identifier of the executed search.

1 call to SearchApiFacetapiAdapter::rememberSearchId()
SearchApiFacetapiAdapter::initActiveFilters in contrib/search_api_facetapi/plugins/facetapi/adapter.inc
Allows the backend to initialize its query object before adding the facet filters.

File

contrib/search_api_facetapi/plugins/facetapi/adapter.inc, line 114
Classes used by the Facet API module.

Class

SearchApiFacetapiAdapter
Facet API adapter for the Search API module.

Code

protected function rememberSearchId($index_id, $search_id) {
  $search_ids = variable_get('search_api_facets_search_ids', array());
  if (empty($search_ids[$index_id][$search_id])) {
    $search_ids[$index_id][$search_id] = $search_id;
    asort($search_ids[$index_id]);
    variable_set('search_api_facets_search_ids', $search_ids);
  }
}