GetList
CDBResult
CSearchTags::GetList( array arSelect = array(), array arFilter = array(), array arOrder = array(), int limit = 100 );
The method returns list of element tags of the search index. Static method.
This method uses the technology of managed caching (Cache Dependencies) if the search module constants are configured: CACHED_b_search_tags and CACHED_b_search_tags_len.
Method parameters
Parameter | Description |
---|---|
arSelect | Array, containing fields for selection.
Name of the field can have the following value:
array( |
arFilter | Array, containing filter as the "field name"=>"filter value" sets.
Name of the field can have the value:
array( |
arOrder | Array, containing the sorting attribute as the "field name"=>"direction" sets.
Name of the field can have the following value:
array( |
limit | Limit of tag number in the results. |
Returned values
The result of the CDBResult request type is returned. Fields that are listed in the arSelect parameters will become available when retrieving the result via CDBResult class methods.
See Also
Examples of use
Retrieving the list of ten most popular iblock module tags.<?
//подключение модуля поиска
if(CModule::IncludeModule('search'))
{
$rsTags = CSearchTags::GetList(
array(),
array(
"MODULE_ID" => "iblock",
),
array(
"CNT" => "DESC",
),
10
);
while($arTag = $rsTags->Fetch())
print_r($arTag);
}
?>
© «Bitrix24», 2001-2023