BuildSearchVectorEvent
extends Event
in package
Dispatched before a search vector is tokenized and stored.
Use it to add values that are not stored in a column of the record, for example tags or other relations kept in a separate table, or to remove values that should not be searchable.
Table of Contents
Properties
Methods
- __construct() : mixed
- addValue() : void
- getValues() : array<int, string>
- setValues() : void
Properties
$locale read-only
public
string
$locale
$row read-only
public
array<string|int, mixed>
$row
$table read-only
public
string
$table
$values
private
array<string|int, mixed>
$values
Methods
__construct()
public
__construct(string $table, array<string, mixed> $row, array<int, string> $values, string $locale) : mixed
Parameters
- $table : string
- $row : array<string, mixed>
-
The raw database row
- $values : array<int, string>
-
The formatted, not yet tokenized values. Each value stays a separate section of the vector, so a quoted phrase never matches across two values.
- $locale : string
-
The language of the record. The values have been resolved in this language, and the values of the vector are normalized and stemmed in it as well.
addValue()
public
addValue(string $value) : void
Parameters
- $value : string
getValues()
public
getValues() : array<int, string>
Return values
array<int, string>setValues()
public
setValues(array<int, string> $values) : void
Parameters
- $values : array<int, string>