@lableb/javascript-sdk
Version:
Lableb cloud search client for javascript
48 lines (34 loc) • 1.23 kB
text/typescript
import { BaseRequestParams, BuildRequestResult } from "../../types";
export interface RecommendRequestParams extends BaseRequestParams {
/** document(data) id that you want similar document of */
id: number | string,
/** the used recommend handler for the recommend function */
recommendHandler?: string,
/** your recommend API Key copied from [Lableb Dashboard](https://dashboard.lableb.com) */
APIKey?: string,
/** limit your recommend results to some number */
limit?: number,
/**
* sort your results by specific field and specific order
*
* You type the field name followed by the `asc` or `desc` to sort data by that field in an ascending or descending order respectively.
*
*
* ```js
* sort: "date desc"
* ```
*/
sort?: string,
/** document(data) title that you want similar document of */
title?: string,
/** document(data) url that you want similar document of */
url?: string,
}
export interface RecommendRequestResult extends BuildRequestResult {
params:
Omit<RecommendRequestParams, "platformName" | "APIKey" | "indexName" | "recommendHandler">
&
{
apikey?: string,
},
}