@studyportals/fawkes 8.7.2-7 → 8.7.2-9
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.
|
@@ -11,20 +11,11 @@ export class MinimumAmountOfRankedResultsRule {
|
|
|
11
11
|
return Promise.resolve(rankedResultsCount >= this.minimumRankedResultsCount);
|
|
12
12
|
}
|
|
13
13
|
async forSitemapGenerator(filterKeyValues) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
throw new DependencyMissingError('SearchApiClient');
|
|
17
|
-
}
|
|
18
|
-
const rankedResultsCount = await this.searchApiClient.getCountWithRankings(filterKeyValues);
|
|
19
|
-
//eslint-disable-next-line no-console
|
|
20
|
-
console.log(`Ranked results count: ${rankedResultsCount}`);
|
|
21
|
-
return rankedResultsCount >= this.minimumRankedResultsCount;
|
|
22
|
-
}
|
|
23
|
-
catch (error) {
|
|
24
|
-
//eslint-disable-next-line no-console
|
|
25
|
-
console.error('Error in MinimumAmountOfRankedResultsRule.forSitemapGenerator:', error);
|
|
26
|
-
throw error;
|
|
14
|
+
if (!this.searchApiClient) {
|
|
15
|
+
throw new DependencyMissingError('SearchApiClient');
|
|
27
16
|
}
|
|
17
|
+
const rankedResultsCount = await this.searchApiClient.getCountWithRankings(filterKeyValues);
|
|
18
|
+
return rankedResultsCount >= this.minimumRankedResultsCount;
|
|
28
19
|
}
|
|
29
20
|
getName() {
|
|
30
21
|
return 'AtLeastFourRankedResultsRule';
|