Skip to content

Search

Recommender solution could be used as a personalized search engine. Following endpoints will help to get a better and intelligent search experience in your application.

Item Search endpoint generates personalized search results tailored for each user in your application. It considers user behavior, current trends, and returns searched results and it could be better replacement for traditional search engine in your application. This endpoint takes several parameters to generate customized search results.

Request path:

POST /v1/item/search
Prerequisite parameters:

name key type value type description
user_id str str Represents the id of a logged-out unique user.
member_id Optional[str] str Represents the id of a logged-in unique user.
keywords List[Dict[str, str]] str You can pass multiple keywords here. Each keyword contains name, value, separator, operator.
user_type Optional[List[Dict[str, str]]] str Pass information about the user here. You can pass multiple user type. Each type contains name, value, separator. These values will be used to find similar users on the fly.
price_lower Optional[int] int Represents the minimum value of price range that you want to filter in your search result.
price_upper Optional[int] int Represents the maximum value of price range that you want to filter in your search result.
category Optional[List[str]] str Represents the category which you want to filter with your search result. It may contain multiple values or remain empty.
flag Optional[Dict[str, str]] str If your dataset has any flags that you want to use to filter the search result you can use here. Otherwise you can keep it empty as well. Please make sure the data type of flag is boolean.
sort Optional[Dict[str, str]] str If you want to sort your search result with any column in ascending or descending order you can pass column name and the order as object.
weight [Dict[str, int]] int Represents how much importance you want to give to a certain column or key in your dataset. Initially in your mapper you have to map certain keys or columns to title, second_title key. Here you can decide to give them a weight in integer value. Available values are title, second_title, third_title, fourth_title, description.
dynamic_pricing bool bool You can use this parameter to enable dynamic pricing in your response.
start Optional[int] int Represents the initial point of pagination. If you want to see first items of index in the first position of your search result it will be 0.
size Optional[int] int Represents the size or number of items to show in search result. Size 10 means it will show first 10 items from index in your search result.

Note

category : You can search the items using category field using the value that you have mapped in the first step with the "category" key.

flag : If you have any boolean values in your dataset and set as flag in mapper settings you can pass those values to filter the items using flag field.

sort : In sort field you have to pass columns that doesn't contain text field. You couldn't pass title, second_title, third_title, fourth_title, description as the column name.

Image search endpoint generates search results based on image similarity. You have to upload an image it will search most similar items for you and retrieve them as response. This endpoint enables you to get a better search experience along with personalized search.

Request path:

POST /v1/image/search

Prerequisite parameter:

name key type value type description
user_id str str Represents the id of a unique user.
start Optional[int] int Represents the initial point of pagination. If you want to see first items of index in the first position of your search result it will be 0.
size Optional[int] int Represents the size or number of items to show in search result. Size 10 means it will show first 10 items from index in your search result.
details bool bool If you want to get recommended items with details this parameter would be True otherwise it would be False.

Example of the request body

image search

This endpoint will retrieve the searched keywords by a specific user in your application. You can use it to track or analyze trends and show info graphics to users.

Request path:

GET /v1/search/keywords