-
Notifications
You must be signed in to change notification settings - Fork 46
Conversation
index.d.ts
Outdated
@@ -1156,6 +1166,14 @@ declare namespace algoliasearchHelper { | |||
* total number of hits of this query on the index | |||
*/ | |||
nbHits: number; | |||
/** | |||
* total number of hits from smart sort |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use the same descriptions as in the client? algolia/algoliasearch-client-javascript#1251
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh nice, I didn't know they were already there. 107374a
…per-js into fix/smart-sort
* value means fewer, but more relevant results, smaller value means more, but | ||
* less relevant results. | ||
*/ | ||
relevancyStrictness?: number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one likely isn't needed (although can be useful for v3 support)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you tell me why it's not needed?
When we need to set relevancyStrictness
from the frontend side, we will need it, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because the interface inherits from the client type, but in this case we still want to copy it for v3 compact
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah got what you mean 👍🏼
* fix(ts): add types for smart sort * chore: update comments
* chore: update yarn.lock algolia/algoliasearch-helper-js@ba912f9 * fix(ts): add types for smart sort (algolia/algoliasearch-helper-js#809) algolia/algoliasearch-helper-js@7fa7528 * fix(ts): make queryID optional (algolia/algoliasearch-helper-js#806) algolia/algoliasearch-helper-js@5ec4e86
Summary
This PR adds the following types for smart sort
relevancyStrictness
in the search parameternbSortedHits
andappliedRelevancyStrictness
in the search response