How do I force rank a specific set of products?
You can specify exactly which products you want to show up in the start of your results by using either the Area or Query controls of bringToTop
.
Query
You can use the bringToTop
query level control to specify a list of product IDs to bring to the top of the result set. You can specify up to 100 IDs. This list will ensure that the products are included in the result set and appear in the order
defined. The reserved id
field should be used to specify which record is pushed to top.
JSON Reference:
{
"biasing":{
"bringToTop":[
"productId1",
"productId3",
"productId2"
]
}
}
Rule
At rule level you can add multiple products to be forced to the top of the returning query, by adding them via the Push To Top screen. This is the same as the bringToTop
functionality, just controllable via Command Center.
- Enter the exact product ID into the textbox field
- Click “add product ID”
- Once the product has been added, you can add another product to the list by its ID.
The id you enter into the textbox must be an exact match to the product id field.
You can only add one product ID at a time via the text box, but you can add as many products as you wish to the list, up to 100. Once you have added all the records you’d like to see returned at the top, you can drag and drop them to the order that you want to have them in.
The results will have the products you specified at the top, with the rest of the products obeying the Biasing Profile specified within the rule (or the Area level profile if none was specified).
What if I have both Rule and Query doing this?
When bring to top is specified at both Rule and Query level, the IDs specified at Query level will overwrite those in the Rule level.
To be more specific, if you search for something that was to return IDs 1, 2, 3:
- If
Push To Top
for ID 4 exists in a rule only, query brings back result IDs 4, 1, 2, 3. - If
Push To Top
for ID 4 is in a rule andbringToTop
for id 5 is specified at query level, the result will have IDs 5, 1, 2, 3, and record ID 4 is not brought to the top anymore.