Web admins can create keyword redirect rules in the Bloomreach Dashboard. If a keyword redirect rule applies to your search API request, then the response includes a keywordRedirect field.
Attribute | Description |
---|---|
original query | The value of the request's q parameter. |
redirected url | The URL where your customer is redirected. |
redirected query | The query after Bloomreach processes the q parameter value. The redirect rule is executed on the redirected query value. |
The redirected URL in search responses can be either a full URL or a relative path, depending on your integration requirements. Redirected URLs are configured in the Bloomreach Dashboard.
Review your logic
We strongly recommend that you review your logic to process the API response. If a keywordRedirect rule is present, it must execute before any other special event, such as a redirect to null results page when numFound is 0. This sequence allows your merchandising team to redirect search terms that otherwise return zero results to a better landing page than the null results page.
Example request and response
GET https://core.dxpapi.com/api/v1/core/?
account_id=<Bloomreach Provided Account ID>
&auth_key=jazzhands
&domain_key=example_com
&request_id=8830241055597
&_br_uid_2=uid=7797686432023:v=11.5:ts=1428617911187:hc=55
&ref_url=http://www.example.com/home
&url=http://www.example.com/index.html?q=Store%20Hours
&request_type=search
&rows=20
&start=0
&fl=pid,title,brand,price,sale_price,colors,sizes,thumb_image,price_range,sale_price_range
&q=Store%20Hours
&search_type=keyword
{
"response": {
"numFound": 1259,
"start": 0,
"docs": [
]
},
"facet_counts": {
},
"keywordRedirect": { //Redirect info
"redirected url": "www.example.com/stores?navid=redirect:stores",
"original query": "Store Hours",
"redirected query": "stores"
},
"category_map": {
},
"sort_fields": [
]
}