public function CaseSensitiveDatabase::preprocessIndexValue in Search API 8
Determines the canonical base form of a value.
For example, when the table is case-insensitive, the value should always be lowercased (or always uppercased) to arrive at the canonical base form.
If tables of the given type use binary comparison in this database, the value should not be changed.
Parameters
string $value: A string to be indexed or searched for.
string $type: (optional) The type of table. One of "index" (for the denormalized table for an entire index), "text" (for an index's fulltext data table) and "field" (for field-specific tables).
Return value
string The value in its canonical base form, which won't clash with any other canonical base form when inserted into a table of the given type.
Overrides GenericDatabase::preprocessIndexValue
File
- modules/
search_api_db/ src/ DatabaseCompatibility/ CaseSensitiveDatabase.php, line 13
Class
- CaseSensitiveDatabase
- Represents a database whose tables are, by default, case-sensitive.
Namespace
Drupal\search_api_db\DatabaseCompatibilityCode
public function preprocessIndexValue($value, $type = 'text') {
return $value;
}