You are here

public function SearchApiQuery::keys in Search API 7

Sets the keys to search for.

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

Parameters

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

Return value

SearchApiQueryInterface The called object.

Overrides SearchApiQueryInterface::keys

File

includes/query.inc, line 556
Contains SearchApiQueryInterface and SearchApiQuery.

Class

SearchApiQuery
Provides a standard implementation of the SearchApiQueryInterface.

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;
}