-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(recommend): update trending facets query props (RECO-1184) (#1434)
* fix: update trending facets query props * fix: add more descriptive docs for parameters
- Loading branch information
1 parent
ffbfc05
commit 913443f
Showing
5 changed files
with
66 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,21 @@ | ||
import { TrendingQuery } from './TrendingQuery'; | ||
export type TrendingFacetsQuery = { | ||
/** | ||
* The name of the target index. | ||
*/ | ||
readonly indexName: string; | ||
|
||
export type TrendingFacetsQuery = Omit< | ||
TrendingQuery, | ||
'model' | 'facetValue' | 'fallbackParameters' | 'queryParameters' | ||
>; | ||
/** | ||
* Threshold for the recommendations confidence score (between 0 and 100). Only recommendations with a greater score are returned. | ||
*/ | ||
readonly threshold?: number; | ||
|
||
/** | ||
* How many recommendations to retrieve. | ||
*/ | ||
readonly maxRecommendations?: number; | ||
|
||
/** | ||
* The facet attribute to get recommendations for. | ||
*/ | ||
readonly facetName: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,40 @@ | ||
import { TrendingQuery } from './TrendingQuery'; | ||
import { RecommendSearchOptions } from '@algolia/recommend'; | ||
|
||
export type TrendingItemsQuery = Omit<TrendingQuery, 'model'>; | ||
export type TrendingItemsQuery = { | ||
/** | ||
* The name of the target index. | ||
*/ | ||
readonly indexName: string; | ||
|
||
/** | ||
* Threshold for the recommendations confidence score (between 0 and 100). Only recommendations with a greater score are returned. | ||
*/ | ||
readonly threshold?: number; | ||
|
||
/** | ||
* How many recommendations to retrieve. | ||
*/ | ||
readonly maxRecommendations?: number; | ||
|
||
/** | ||
* List of [search parameters](https://www.algolia.com/doc/api-reference/search-api-parameters/) to send. | ||
*/ | ||
readonly queryParameters?: RecommendSearchOptions; | ||
|
||
/** | ||
* List of [search parameters](https://www.algolia.com/doc/api-reference/search-api-parameters/) to send. | ||
* | ||
* Additional filters to use as fallback when there aren’t enough recommendations. | ||
*/ | ||
readonly fallbackParameters?: RecommendSearchOptions; | ||
|
||
/** | ||
* The facet attribute to get recommendations for. | ||
*/ | ||
readonly facetName?: string; | ||
|
||
/** | ||
* The value of the target facet. | ||
*/ | ||
readonly facetValue?: string; | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters