Метод searchQuery

private

Сигнатура метода

private function searchQuery(array $words): Query

Возвращает: Query

Описание

Search is deliberately not cut back to the first page size, the way the neighbouring {@see TemplateProvider} does it: the first page is the cheap default, and refining the query is the only way to a template past it - a page sized cap would hide the very matches the administrator has just narrowed down to. What bounds it is {@see self::SEARCH_LIMIT}, set above everything the client renders and there only to break off the full scan a one letter query would otherwise run on every keystroke. Every word of the query is matched separately, because getQuery() glues the words back with spaces and "Deal approval" would then never reach "Deal renewal approval". The words are required together, so each of them comes as a subtree of its own: a single OR over the whole query would dissolve the rest of it. A match by id alone is not privileged over the matches by name: the result is ordered by id descending and cut at {@see self::SEARCH_LIMIT}, so the row the exact id found can fall past the cap once that many names hold the same digits.

Параметры

1
Имя Тип По умолчанию Флаги
$words array —
—

Расположение

Исходный файл метода в Bitrix Framework

Путь к исходному файлу Source
~/bitrix/modulesbizproc/lib/integration/ui/entityselector/accesstemplateprovider.php
Расположение метода в файле
Строки 207–219

Исходный код

PHP