search¶
- search¶
- Path
$GLOBALS['TCA'][$table]['columns'][$field]['config']
- Type
array
- Scope
Search
- Types
Defines additional search-related options for a given field.
- pidonly¶
- Type
boolean
Searches in the column only if search happens on the single page, does not search the field if searching in the whole table.
- case¶
- Type
boolean
Makes the search case-sensitive. This requires a proper database collation for the field, see your database documentation.
- andWhere¶
- Type
string
Additional SQL WHERE statement without 'AND'. With this it is possible to place an additional condition on the field when it is searched
Example from "tt_content" bodytext:
'bodytext' => [ 'config' => [ 'search' => [ 'andWhere' => '{#CType}=\'text\' OR {#CType}=\'textpic\'', ], ... ], ... ],
This means that the "bodytext" field of the "tt_content" table will be searched in only for elements of type Text and Text & Images. This helps making any search more relevant.
The above example uses the special field quoting syntax
{#...}
around identifiers of the QueryHelper to be as DBAL compatible as possible.