@studyportals/fawkes 8.7.2-10 → 8.7.2-13
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.
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { DependencyTypes } from '../enums/DependencyTypes';
|
|
2
|
-
import { Area, AreaAttendance, Attendance, Continent, Country, CountryAttendance, Unfiltered, RankedArea, RankedAttendance, RankedAttendanceDiscipline, RankedContinent, RankedContinentAttendance, RankedCountry, RankedCountryAttendance,
|
|
2
|
+
import { Area, AreaAttendance, Attendance, Continent, Country, CountryAttendance, Unfiltered, RankedArea, RankedAttendance, RankedAttendanceDiscipline, RankedContinent, RankedContinentAttendance, RankedCountry, RankedCountryAttendance,
|
|
3
|
+
// RankedCountryDiscipline,
|
|
4
|
+
RankedDiscipline, RankedUnfiltered, CountryCity, CountryAreaCity } from '../organisations/policies';
|
|
3
5
|
export class SearchIndexabilityManager {
|
|
4
6
|
policies;
|
|
5
7
|
constructor(portalType, seoInfoBase, filterState, sortingState, applicationState) {
|
|
@@ -28,7 +30,6 @@ export class SearchIndexabilityManager {
|
|
|
28
30
|
new RankedContinentAttendance(dependencies),
|
|
29
31
|
new RankedCountry(dependencies),
|
|
30
32
|
new RankedCountryAttendance(dependencies),
|
|
31
|
-
new RankedCountryDiscipline(dependencies),
|
|
32
33
|
new RankedDiscipline(dependencies),
|
|
33
34
|
new RankedUnfiltered(dependencies)
|
|
34
35
|
];
|
|
@@ -14,6 +14,10 @@ export class MinimumAmountOfRankedResultsRule {
|
|
|
14
14
|
if (!this.searchApiClient) {
|
|
15
15
|
throw new DependencyMissingError('SearchApiClient');
|
|
16
16
|
}
|
|
17
|
+
if (!this.searchApiClient.getCountWithRankings) {
|
|
18
|
+
const filterKeys = [...filterKeyValues.keys()];
|
|
19
|
+
throw new DependencyMissingError(`CountwithRankings ${filterKeys.join(',')}`);
|
|
20
|
+
}
|
|
17
21
|
const rankedResultsCount = await this.searchApiClient.getCountWithRankings(filterKeyValues);
|
|
18
22
|
return rankedResultsCount >= this.minimumRankedResultsCount;
|
|
19
23
|
}
|