Feature: #106972 - Configure searchable fields
See forge#106972
Description
TYPO3 now automatically includes all fields of suitable types in backend search operations, e.g., in the List module.
This eliminates the need for the previously used TCA ctrl
option
search
, which has been removed.
Instead, a new per-field configuration option
searchable
has been introduced. It allows integrators to fine-tune whether
a specific field should be included in backend search queries.
By default, all fields of supported types are considered searchable. To exclude a field from being searchable, set the following in the field’s TCA configuration:
'my_field' => [
'config' => [
'type' => 'input',
'searchable' => false,
],
],
Note that until
search
is manually removed from your TCA, the
automatic TCA migration sets all suitable fields, which are not included
in the
search
configuration, to
searchable => false
to
keep current behavior.
Supported Field Types
The following TCA field types support the
searchable
option and are
automatically considered in searches unless explicitly excluded:
color
datetime
(when not using a customdb
)Type email
flex
input
json
link
slug
text
uuid
Unsupported field types such as
file
,
inline
,
password
or
group
are excluded from search and do not support the
searchable
option.
Impact
- Backend search becomes more consistent and automatic.
- No need to manually maintain a
search
list in TCA.Fields - Integrators have more granular control over search behavior on a field level.
- Custom fields can easily be excluded from search using the
searchable
option.
Migration
If your extension previously relied on the
search
TCA option,
remove it from the
ctrl
section and instead define
'searchable' => false
on fields that should be excluded from search results.
No action is needed if the default behavior (search all suitable fields) is acceptable.
Example
return [
'columns' => [
'title' => [
'config' => [
'type' => 'input',
'searchable' => true, // optional, true by default
],
],
'notes' => [
'config' => [
'type' => 'text',
'searchable' => false, // explicitly excluded
],
],
],
];