recombee_api_client.api_requests.add_search_synonym module

class recombee_api_client.api_requests.add_search_synonym.AddSearchSynonym(term: str, synonym: str, one_way: bool = UUID('f42949a0-da7c-4253-b26e-da6d0fec383a'))

Bases: recombee_api_client.api_requests.request.Request

Adds a new synonym for the [Search items](https://docs.recombee.com/api.html#search-items).

When the term is used in the search query, the synonym is also used for the full-text search. Unless oneWay=true, it works also in the opposite way (synonym -> term).

An example of a synonym can be science fiction for the term sci-fi.

Required parameters:

Parameters
  • term – A word to which the synonym is specified.

  • synonym – A word that should be considered equal to the term by the full-text search engine.

Optional parameters:

Parameters

one_way – If set to true, only term -> synonym is considered. If set to false, also synonym -> term works.

Default: false.

get_body_parameters() → dict

Values of body parameters as a dictionary (name of parameter: value of the parameter).

get_query_parameters() → dict

Values of query parameters as a dictionary (name of parameter: value of the parameter).