Skip to content

Commit

Permalink
fix(ts): add types for smart sort (algolia/algoliasearch-helper-js#809)
Browse files Browse the repository at this point in the history
* fix(ts): add types for smart sort

* chore: update comments
  • Loading branch information
Eunjae Lee committed Feb 10, 2021
1 parent a5b384a commit f246a24
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/algoliasearch-helper/index.d.ts
Expand Up @@ -511,6 +511,13 @@ declare namespace algoliasearchHelper {
ruleContexts?: string[];
optionalFilters?: Array<string | string[]>;
queryLanguages?: string[];

/**
* The relevancy threshold to apply to search in a virtual index [0-100]. A Bigger
* value means fewer, but more relevant results, smaller value means more, but
* less relevant results.
*/
relevancyStrictness?: number;
}

export class SearchParameters implements PlainSearchParameters {
Expand Down Expand Up @@ -1156,6 +1163,14 @@ declare namespace algoliasearchHelper {
* total number of hits of this query on the index
*/
nbHits: number;
/**
* subset of hits selected when relevancyStrictness is applied
*/
nbSortedHits?: number;
/**
* the relevancy threshold applied to search in a virtual index
*/
appliedRelevancyStrictness?: number;
/**
* total number of pages with respect to the number of hits per page and the total number of hits
*/
Expand Down

0 comments on commit f246a24

Please sign in to comment.