File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ useContainer(Container); // eslint-disable-line react-hooks/rules-of-hooks
4141
4242 // Initialize Search Service
4343 const searchService = Container . get ( SearchService ) ;
44- await searchService . ensureIndexes ( ) ;
44+ await searchService . setupIndexes ( ) ;
4545
4646 // Add crons to DI container
4747 const CronServices = [ DigestCron ] ;
Original file line number Diff line number Diff line change @@ -57,7 +57,12 @@ export class SearchService {
5757 } ) ;
5858 } ;
5959
60- public ensureIndexes = async ( ) : Promise < void > => {
60+ public setupIndexes = async ( ) : Promise < void > => {
61+ await this . ensureIndexes ( ) ;
62+ await this . updateFilterableAttributes ( ) ;
63+ } ;
64+
65+ private ensureIndexes = async ( ) : Promise < void > => {
6166 await this . meilisearch . createIndex ( "project" , {
6267 primaryKey : "id" ,
6368 } ) ;
@@ -72,8 +77,6 @@ export class SearchService {
7277 primaryKey : "id" ,
7378 } ) ;
7479 this . logger . info ( { message : "contributor index created" } ) ;
75-
76- await this . updateFilterableAttributes ( ) ;
7780 } ;
7881
7982 private async updateFilterableAttributes ( ) : Promise < void > {
You can’t perform that action at this time.
0 commit comments