Skip to content

Commit e9c0f30

Browse files
authored
feat(types): add reranking engine settings to types (#1378)
1 parent 8c8db3d commit e9c0f30

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

packages/client-search/src/types/SearchOptions.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,4 +359,12 @@ export type SearchOptions = {
359359
* This parameter is only used to turn off Dynamic Re-Ranking (with false) at search time.
360360
*/
361361
readonly enableReRanking?: boolean;
362+
363+
/**
364+
* When Dynamic Re-Ranking is enabled, only records that match these filters will be impacted by Dynamic Re-Ranking.
365+
*/
366+
readonly reRankingApplyFilter?:
367+
| string
368+
| readonly string[]
369+
| ReadonlyArray<readonly string[] | string>;
362370
};

packages/client-search/src/types/Settings.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,4 +343,21 @@ export type Settings = {
343343
};
344344
};
345345
};
346+
347+
/**
348+
* Whether this index should use Dynamic Re-Ranking.
349+
* @link https://www.algolia.com/doc/guides/algolia-ai/re-ranking/
350+
*
351+
* Note: You need to turn on Dynamic Re-Ranking on your index for it to have an effect on
352+
* your search results. You can do this through the Re-Ranking page on the dashboard.
353+
*/
354+
readonly enableReRanking?: boolean;
355+
356+
/**
357+
* When Dynamic Re-Ranking is enabled, only records that match these filters will be impacted by Dynamic Re-Ranking.
358+
*/
359+
readonly reRankingApplyFilter?:
360+
| string
361+
| readonly string[]
362+
| ReadonlyArray<readonly string[] | string>;
346363
};

0 commit comments

Comments
 (0)