protected function getSearchableColumns($type)
{
$fields = $this->config->get('contenttypes/' . $type . '/fields');
foreach ($fields as $field => $options) {
if (in_array($options['type'], ['text', 'textarea', 'html', 'markdown']) || isset($options['searchable']) && $options['searchable'] === true) {
if (isset($options['searchweight'])) {
$weight = (int) $options['searchweight'];
} elseif (isset($fields['slug']['uses']) && in_array($field, (array) $fields['slug']['uses'])) {
$weight = 100;
} else {
$weight = 50;
}
$this->searchableTypes[$type][$field] = ['weight' => $weight];
}
}
}