You are here

public function SearchApiMultiQuery::keys in Search API Multi-Index Searches 7

Sets the keys to search for.

If this method is not called on the query before execution, or it is called with NULL, this will be a filter-only query.

Parameters

string|array|null $keys: A string with the unparsed search keys, or NULL to use no search keys.

Return value

SearchApiMultiQueryInterface The called object.

Overrides SearchApiMultiQueryInterface::keys

File

./search_api_multi.query.inc, line 533

Class

SearchApiMultiQuery
Standard implementation of SearchApiMultiQueryInterface.

Code

public function keys($keys = NULL) {
  $this->orig_keys = $keys;
  if (isset($keys)) {
    $this->keys = $this
      ->parseKeys($keys, $this->options['parse mode']);
  }
  else {
    $this->keys = NULL;
  }
  return $this;
}