Patch Existing Rules
Patching rules will only change the rules that are specified in the request.
- Shell
- JavaScript
- Ruby
- Python
- PHP
- Java
- C#
info
The above command returns a 204 Success response on success. For simplicity sake, a 204 Success response will be returned even if the item already exists.
#
HTTP RequestPATCH https://ac.cnstrc.com/refined_filters/[filter_name]/[filter_value]?key=[your index key]§ion=[section]
#
URL ParametersParameter | Description | |
---|---|---|
filter_name | The name of the facet you'd like to patch searchandizing rules for. | |
filter_value | The value of the facet you'd like to patch searchandizing rules for. | |
section | Yes | The index section you'd like to retrieve results from (typically Products ). |
#
JSON SpecificationsExample JSON:
#
Types of rulesid | Description |
---|---|
slot_rules | With slot rules, you can add an item to recall and pin it to a particular position. Provide item_id and a particular position for the item(s). |
boost_rules | Boost or bury the score (and in turn, ranking) of matching items. |
whitelist_rule | Restrict recall to only the matching items. |
blacklist_rules | Remove matching items from recall. |
#
ParametersParameter | Required? | Description |
---|---|---|
rule | Yes | Rules can accept a dictionary of the various rule specs as show in the above JSON example. |
active | No | Your slot rule can be defined but set to inactive if you wish by setting active field to false. |
start_time | No | Start time of when the searchandizing rule should be enabled. |
end_time | No | End time of when the searchandizing rule should be disabled. |