protected function FuzzySearchService::setDb in Fuzzy Search 7
Helper method for setting the database to the one selected by the user.
6 calls to FuzzySearchService::setDb()
- FuzzySearchService::createFieldTable in includes/
service.inc - Helper method for creating the table for a field.
- FuzzySearchService::deleteItems in includes/
service.inc - Deletes indexed items from this server.
- FuzzySearchService::fieldsUpdated in includes/
service.inc - Implements SearchApiServiceInterface::__construct().
- FuzzySearchService::indexItems in includes/
service.inc - Indexes the specified items.
- FuzzySearchService::removeIndex in includes/
service.inc - Implements SearchApiServiceInterface::__construct().
File
- includes/
service.inc, line 1327
Class
- FuzzySearchService
- Search service class using the database for storing index information.
Code
protected function setDb() {
if (!isset($this->previousDb)) {
list($key, $target) = explode(':', $this->options['database'], 2);
$this->previousDb = db_set_active($key);
if (!isset($this->queryOptions)) {
$this->queryOptions = array(
'target' => $target,
);
}
return TRUE;
}
return FALSE;
}