S
S
Sergey Valitov2018-05-18 23:09:30
1C-Bitrix
Sergey Valitov, 2018-05-18 23:09:30

How to set up filtering of search results in Bitrix?

Hello! Guys, such a question.
There is a search.page component, it has this:

$arFilter = array(
    "SITE_ID" => SITE_ID,
    "QUERY" => $arResult["REQUEST"]["~QUERY"]
);
$obSearch->Search($arFilter, array("RANK" => "DESC"), array('STEMMING' => false));

The Bitrix API says that you can filter the results by the type of infoblock, its id, and something else. And I need to filter by two sections. In general, I have a directory, inside it there are two categories. 1) Technique. 2) Spare parts.
I need the search to search, for example, only from the spare parts section. How to do something like this?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question