public function QueryInterface::setSearchId in Search API 8
Sets the search ID.
The search ID is a freely-chosen machine name identifying this search query for purposes of identifying the query later in the page request. It will be used, amongst other things, to identify the query in the search results cache service.
If the set ID is the same as a display plugin ID, this will also automatically set that display plugin for this query. Queries for the same display or search page should therefore usually use the same search ID.
Parameters
string $search_id: The new search ID.
Return value
$this
See also
\Drupal\search_api\Query\QueryInterface::getDisplayPlugin()
\Drupal\search_api\Query\ResultsCacheInterface
1 method overrides QueryInterface::setSearchId()
- Query::setSearchId in src/
Query/ Query.php - Sets the search ID.
File
- src/
Query/ QueryInterface.php, line 102
Class
- QueryInterface
- Represents a search query on a Search API index.
Namespace
Drupal\search_api\QueryCode
public function setSearchId($search_id);