• Модуль: translate
  • Путь к файлу: ~/bitrix/modules/translate/lib/index/phraseindexsearch.php
  • Класс: BitrixTranslateIndexPhraseIndexSearch
  • Вызов: PhraseIndexSearch::getFullTextStopWords
static function getFullTextStopWords(): array
{
	static $worldList;
	if ($worldList === null)
	{
		$minLengthFulltextWorld = self::getFullTextMinLength();
		$worldList = [];
		$cache = Cache::createInstance();
		if ($cache->initCache(3600, 'translate::FullTextStopWords'))
		{
			$worldList = $cache->getVars();
		}
		elseif ($cache->startDataCache())
		{
			try
			{
				if (self::isInnodbEngine())
				{
					$res = Application::getConnection()->query(
						"SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_DEFAULT_STOPWORD"
					);
					while ($row = $res->fetch())
					{
						if (mb_strlen($row['value']) > $minLengthFulltextWorld)
						{
							$worldList[] = $row['value'];
						}
					}
				}
			}
			catch (SqlQueryException $exception)
			{}
			$cache->endDataCache($worldList);
		}
	}

	return $worldList;
}