A customized search rule is represented as a customized_search object. A customized_search object is a JSON object where each key, value pair corresponds to a rule and what property should be pinned and what property should be hidden.
All pins and hides must be either string
or int
Attribute | Type | Required | Content |
---|---|---|---|
|
| Required | The query for which the custimized search rules should be applied |
| 'dict' with keys | Required | The products which should be pinned to the top of the query and the products which should be hidden. |
| 'dict' with keys | Required | The categories which should be pinned to the top of the query and the categories which should be hidden. |
| 'dict' with keys | Required | The suggestions which should be pinned to the top of the query and the suggestions which should be hidden. |
| 'dict' with keys | Required | The pages which should be pinned to the top of the query and the pages which should be hidden. |
{
"query": "pants",
"products": {
"pin" : [123,456],
"hide" : [555,222]
},
"categories": {
"pin" : [12,67],
"hide" : [555]
},
"suggestions": {
"pin" : ["trousers","skitrousers"],
"hide" : ["trouts"]
},
"pages": {
"pin" : [999,111],
"hide" : [543,234,788]
}
}