From 06b62e65f9e2c38d57278d7c7c0e355da80d922e Mon Sep 17 00:00:00 2001 From: WHLukasz Date: Tue, 8 Oct 2024 09:27:14 +0200 Subject: [PATCH 1/2] #23931 index boosting --- docs/API/search.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/API/search.md b/docs/API/search.md index e3c90a38..486b6fff 100644 --- a/docs/API/search.md +++ b/docs/API/search.md @@ -111,3 +111,21 @@ You can use the `random_seed` parameter to retrieve random content objects. The !!! Note Since random_seed is changing the order of retrieved content objects, it will override the value of your `order_by` parameter. + +## Increase scoring for specific content types + +!!! Note + Index boosting is available in Custom plan tier. + +Index boosting allows you to prioritize results from specific indices when performing searches across multiple content types (CTDs). This feature increases the score of results from certain indices based on user-defined weights, which is useful when some CTDs are more relevant than others. + +Query format: +Pass the `indices_boost` parameter in your query to boost specific CTDs: + +``` +/api/v1/search?indices_boost[ctd1Name]=2&indices_boost[ctd2Name]=1.5 +``` +{ data-search-exclude } + +* ctd1Name, ctd2Name – names of the CTDs. +* 2, 1.5 – boost values (higher means more weight) From cc37a3a2598e5d6d607369a6c8520fbcb42f365d Mon Sep 17 00:00:00 2001 From: WHLukasz Date: Tue, 8 Oct 2024 09:38:54 +0200 Subject: [PATCH 2/2] #23931 add example section improve readability --- docs/API/search.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/API/search.md b/docs/API/search.md index 486b6fff..45d0ae7e 100644 --- a/docs/API/search.md +++ b/docs/API/search.md @@ -119,13 +119,13 @@ You can use the `random_seed` parameter to retrieve random content objects. The Index boosting allows you to prioritize results from specific indices when performing searches across multiple content types (CTDs). This feature increases the score of results from certain indices based on user-defined weights, which is useful when some CTDs are more relevant than others. -Query format: -Pass the `indices_boost` parameter in your query to boost specific CTDs: +!!! Example + Pass the `indices_boost` parameter in your query to boost specific CTDs: -``` -/api/v1/search?indices_boost[ctd1Name]=2&indices_boost[ctd2Name]=1.5 -``` -{ data-search-exclude } + ``` + /api/v1/search?indices_boost[ctd1Name]=2&indices_boost[ctd2Name]=1.5 + ``` + { data-search-exclude } -* ctd1Name, ctd2Name – names of the CTDs. -* 2, 1.5 – boost values (higher means more weight) + * ctd1Name, ctd2Name – names of the CTDs. + * 2, 1.5 – boost values (higher means more weight)