private function getSuggestions($req)
 {
     $request = Convert::raw2sql($req->requestVar('request'));
     // If the class to pick config value is not set, this will not work too well!
     // In that case, we'll just return an empty result.
     if (empty($this->config['classToPick'])) {
         $results = array(array('id' => '0', 'title' => 'none selected', 'full' => "select none", 'style' => 'color:red'));
     } else {
         $class = $this->config['classToPick'];
         $search = Config::inst()->get($class, 'searchable_fields');
         $searchArray = array();
         $sqlQuery = new SQLQuery();
         $sqlQuery->setFrom($class);
         $sqlQuery->selectField('ID');
         $sqlQuery->useDisjunction();
         foreach ($search as $key => $value) {
             if (!is_array($value)) {
                 if (is_string($key)) {
                     $sqlQuery->addWhere("{$key} LIKE '%{$request}%'");
                 } else {
                     $sqlQuery->addWhere("{$value} LIKE '%{$request}%'");
                 }
             }
         }
         $results = array(array('id' => '0', 'title' => 'none selected', 'full' => "select none", 'style' => 'color:red'));
         $dbResults = $sqlQuery->execute();
         foreach ($dbResults as $row) {
             $object = DataObject::get($class)->byID($row['ID']);
             $results[] = array('id' => $object->ID, 'title' => $object->LinkTitle(), 'full' => $object->LinkTitle());
         }
     }
     return json_encode($results);
 }