V
V
VoRoN19992021-12-27 12:29:14
1C-Bitrix
VoRoN1999, 2021-12-27 12:29:14

How to write a search query on Bitrix?

Hello.

Redesigning the search.page component

There is a filter
$arFilter = array(
"SITE_ID" => SITE_ID,
"=QUERY" => "OR car is red",
"TAGS" => $arResult["REQUEST"]["~TAGS"] ,
);

$aSort = array("CUSTOM_RANK" => "DESC", "TITLE_RANK" => "DESC", "RANK" => "DESC", "DATE_CHANGE" => "DESC");

$obSearch->Search($arFilter, $aSort, $exFILTER);

Now the results are displayed in a different order.

I need to give clearer matches first, and then everything else.

Matching results should come first: the car is red, then the car and red.
Now the first place may be the results of the blue car (as I understand it, it does not look at the second word)

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