You are here

public function DatabaseCompatibilityHandlerInterface::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.

1 method overrides DatabaseCompatibilityHandlerInterface::preprocessIndexValue()
GenericDatabase::preprocessIndexValue in modules/search_api_db/src/DatabaseCompatibility/GenericDatabase.php
Determines the canonical base form of a value.

File

modules/search_api_db/src/DatabaseCompatibility/DatabaseCompatibilityHandlerInterface.php, line 72

Class

DatabaseCompatibilityHandlerInterface
Bundles methods for resolving DBMS-specific differences.

Namespace

Drupal\search_api_db\DatabaseCompatibility

Code

public function preprocessIndexValue($value, $type = 'text');