SearchVectorFieldConfiguration
extends DcaFieldConfiguration
in package
Table of Contents
Properties
- $async : bool
- $eval : array<string|int, mixed>
- $exclude : bool
- $fieldName : string
- $fields : array<int, string>
- $filter : bool
- $language : string|null
- $languageField : string|null
- $normalizer : string|null
- $search : bool
- $sorting : bool
- $stemmer : string|null
- $flag : int|null
- $table : string
Methods
- __construct() : mixed
- getEval() : array<string|int, mixed>
- getEvalValue() : mixed
- getFieldName() : string
- getFields() : array<int, string>
- getFlag() : int|null
- getLanguage() : string|null
- getLanguageField() : string|null
- getNormalizer() : string|null
- getStemmer() : string|null
- getTable() : string
- isAsync() : bool
- isExclude() : bool
- isFilter() : bool
- isSearch() : bool
- isSorting() : bool
- setAsync() : SearchVectorFieldConfiguration
- Whether the search vector is rebuilt asynchronously after a record was saved, copied or restored in the backend.
- setEvalValue() : DcaFieldConfiguration
- setExclude() : DcaFieldConfiguration
- setFieldName() : SearchVectorFieldConfiguration
- setFields() : SearchVectorFieldConfiguration
- The fields whose values are written to the search vector. Values are resolved like in the backend (options, references, foreign keys, …).
- setFilter() : DcaFieldConfiguration
- setFlag() : DcaFieldConfiguration
- setLanguage() : SearchVectorFieldConfiguration
- The language of the records, e.g. "de". Used for stemming and for resolving option labels, independent of the language of the current user. Falls back to the default locale of the application (kernel.default_locale), which is often "en" even on German websites, so set it explicitly for tables with records in one language.
- setLanguageField() : SearchVectorFieldConfiguration
- The field holding the language of a record, for tables with records in different languages. Records with an empty value fall back to the language set with setLanguage().
- setNormalizer() : SearchVectorFieldConfiguration
- The service id of a NormalizerInterface implementation (usually its class name), e.g. GermanNormalizer::class.
- setSearch() : DcaFieldConfiguration
- setSorting() : DcaFieldConfiguration
- setStemmer() : SearchVectorFieldConfiguration
- The service id of a StemmerInterface implementation (usually its class name), e.g. SnowballStemmer::class.
Properties
$async
protected
bool
$async
= true
$eval
protected
array<string|int, mixed>
$eval
= []
$exclude
protected
bool
$exclude
= false
$fieldName
protected
string
$fieldName
= 'searchVector'
$fields
protected
array<int, string>
$fields
= []
$filter
protected
bool
$filter
= false
$language
protected
string|null
$language
= null
$languageField
protected
string|null
$languageField
= null
$normalizer
protected
string|null
$normalizer
= null
$search
protected
bool
$search
= false
$sorting
protected
bool
$sorting
= false
$stemmer
protected
string|null
$stemmer
= null
$flag
private
int|null
$flag
= null
$table read-only
private
string
$table
Methods
__construct()
public
__construct(string $table) : mixed
Parameters
- $table : string
getEval()
public
getEval() : array<string|int, mixed>
Return values
array<string|int, mixed>getEvalValue()
public
getEvalValue(string $key) : mixed
Parameters
- $key : string
getFieldName()
public
getFieldName() : string
Return values
stringgetFields()
public
getFields() : array<int, string>
Return values
array<int, string>getFlag()
public
getFlag() : int|null
Return values
int|nullgetLanguage()
public
getLanguage() : string|null
Return values
string|nullgetLanguageField()
public
getLanguageField() : string|null
Return values
string|nullgetNormalizer()
public
getNormalizer() : string|null
Return values
string|nullgetStemmer()
public
getStemmer() : string|null
Return values
string|nullgetTable()
public
getTable() : string
Return values
stringisAsync()
public
isAsync() : bool
Return values
boolisExclude()
public
isExclude() : bool
Return values
boolisFilter()
public
isFilter() : bool
Return values
boolisSearch()
public
isSearch() : bool
Return values
boolisSorting()
public
isSorting() : bool
Return values
boolsetAsync()
Whether the search vector is rebuilt asynchronously after a record was saved, copied or restored in the backend.
public
setAsync(bool $async) : SearchVectorFieldConfiguration
The message is sent to the contao_prio_normal messenger transport and the vector is usually up to date a few seconds later. Without that transport, the vector is rebuilt right away. Enabled by default.
Parameters
- $async : bool
Return values
SearchVectorFieldConfigurationsetEvalValue()
public
setEvalValue(string $key, mixed $value) : DcaFieldConfiguration
Parameters
- $key : string
- $value : mixed
Return values
DcaFieldConfigurationsetExclude()
public
setExclude(bool $exclude) : DcaFieldConfiguration
Parameters
- $exclude : bool
Return values
DcaFieldConfigurationsetFieldName()
public
setFieldName(string $fieldName) : SearchVectorFieldConfiguration
Parameters
- $fieldName : string
Return values
SearchVectorFieldConfigurationsetFields()
The fields whose values are written to the search vector. Values are resolved like in the backend (options, references, foreign keys, …).
public
setFields(array<int, string> $fields) : SearchVectorFieldConfiguration
Parameters
- $fields : array<int, string>
Return values
SearchVectorFieldConfigurationsetFilter()
public
setFilter(bool $filter) : DcaFieldConfiguration
Parameters
- $filter : bool
Return values
DcaFieldConfigurationsetFlag()
public
setFlag(int|null $flag) : DcaFieldConfiguration
Parameters
- $flag : int|null
Return values
DcaFieldConfigurationsetLanguage()
The language of the records, e.g. "de". Used for stemming and for resolving option labels, independent of the language of the current user. Falls back to the default locale of the application (kernel.default_locale), which is often "en" even on German websites, so set it explicitly for tables with records in one language.
public
setLanguage(string|null $language) : SearchVectorFieldConfiguration
Parameters
- $language : string|null
Return values
SearchVectorFieldConfigurationsetLanguageField()
The field holding the language of a record, for tables with records in different languages. Records with an empty value fall back to the language set with setLanguage().
public
setLanguageField(string|null $languageField) : SearchVectorFieldConfiguration
Parameters
- $languageField : string|null
Return values
SearchVectorFieldConfigurationsetNormalizer()
The service id of a NormalizerInterface implementation (usually its class name), e.g. GermanNormalizer::class.
public
setNormalizer(string|null $normalizer) : SearchVectorFieldConfiguration
Normalizers unify different spellings of a word before stemming. Disabled by default. Rebuild the search vectors after changing the normalizer.
Parameters
- $normalizer : string|null
Return values
SearchVectorFieldConfigurationsetSearch()
public
setSearch(bool $search) : DcaFieldConfiguration
Parameters
- $search : bool
Return values
DcaFieldConfigurationsetSorting()
public
setSorting(bool $sorting) : DcaFieldConfiguration
Parameters
- $sorting : bool
Return values
DcaFieldConfigurationsetStemmer()
The service id of a StemmerInterface implementation (usually its class name), e.g. SnowballStemmer::class.
public
setStemmer(string|null $stemmer) : SearchVectorFieldConfiguration
Stemming is disabled by default. Rebuild the search vectors after changing the stemmer.
Parameters
- $stemmer : string|null