@studyportals/fawkes 8.7.2-18 → 8.7.2-19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -20,10 +20,17 @@ export class MinimumAmountOfRankedResultsRule {
|
|
|
20
20
|
}
|
|
21
21
|
// eslint-disable-next-line no-console
|
|
22
22
|
console.debug('MinimumAmountOfRankedResultsRule: Checking ranked results count for filterKeyValues:', filterKeyValues);
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
try {
|
|
24
|
+
const rankedResultsCount = await this.searchApiClient.getCountWithRankings(filterKeyValues);
|
|
25
|
+
// eslint-disable-next-line no-console
|
|
26
|
+
console.debug('MinimumAmountOfRankedResultsRule: Ranked results count:', rankedResultsCount);
|
|
27
|
+
return rankedResultsCount >= this.minimumRankedResultsCount;
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
// eslint-disable-next-line no-console
|
|
31
|
+
console.error('MinimumAmountOfRankedResultsRule: API call failed:', error);
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
27
34
|
}
|
|
28
35
|
getName() {
|
|
29
36
|
return 'AtLeastFourRankedResultsRule';
|