Contao Utils Bundle

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

Methods

getEval()

public getEval() : array<string|int, mixed>
Return values
array<string|int, mixed>

setAsync()

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
SearchVectorFieldConfiguration

setLanguage()

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
SearchVectorFieldConfiguration

setNormalizer()

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
SearchVectorFieldConfiguration

        
On this page

Search results