You are here

public function SearchApiLiveResultsSearch::getQuery in Search API live results 7

Create the query that would be issued for this search for the complete keys.

Parameters

$complete: A string containing the complete search keys.

$incomplete: A string containing the incomplete last search key.

Return value

SearchApiQueryInterface The query that would normally be executed when only $complete was entered as the search keys for this search.

File

./search_api_live_results.module, line 421

Class

SearchApiLiveResultsSearch
Class describing the settings for a certain search for which autocompletion is available.

Code

public function getQuery($keys) {
  $info = search_api_live_results_get_types($this->type);
  if (empty($info['create query'])) {
    return NULL;
  }
  $query = $info['create query']($this, $keys);
  return $query;
}