@@ -95,7 +95,7 @@ class StandaloneIndexing(props: SearchApiProperties, componentRegistry: Componen
9595 implicit val ec : ExecutionContextExecutorService =
9696 ExecutionContext .fromExecutorService(Executors .newFixedThreadPool(SearchType .values.size))
9797
98- def futureOnComplete (future : Future [Try [ReindexResult ]], indexName : String ): Future [Try [ReindexResult ]] = {
98+ def handleOnComplete (future : Future [Try [ReindexResult ]], indexName : String ): Future [Try [ReindexResult ]] = {
9999 future.onComplete {
100100 case Success (Success (reindexResult : ReindexResult )) => logger.info(
101101 s " Completed indexing of ${reindexResult.totalIndexed} $indexName in ${reindexResult.millisUsed} ms. "
@@ -120,21 +120,33 @@ class StandaloneIndexing(props: SearchApiProperties, componentRegistry: Componen
120120 val reindexFuture = Future {
121121 indexService.indexDocuments(indexingBundle)
122122 }
123- futureOnComplete (reindexFuture, indexService.searchIndex)
123+ handleOnComplete (reindexFuture, indexService.searchIndex)
124124 }
125125
126+ val indexingBundle = IndexingBundle (
127+ grepBundle = Some (grepBundle),
128+ taxonomyBundle = Some (taxonomyBundlePublished),
129+ myndlaBundle = Some (myndlaBundle),
130+ )
131+
126132 Await .result(
127133 Future .sequence(
128134 Seq (
129135 reindexWithIndexService(componentRegistry.learningPathIndexService, shouldUsePublishedTax = true ),
130136 reindexWithIndexService(componentRegistry.articleIndexService, shouldUsePublishedTax = true ),
131137 reindexWithIndexService(componentRegistry.draftIndexService, shouldUsePublishedTax = false ),
132138 reindexWithIndexService(componentRegistry.draftConceptIndexService, shouldUsePublishedTax = true ),
133- futureOnComplete(
139+ handleOnComplete(
140+ Future {
141+ componentRegistry.grepIndexService.indexDocuments(None , indexingBundle.grepBundle)
142+ },
143+ " greps" ,
144+ ),
145+ handleOnComplete(
134146 Future {
135- componentRegistry.grepIndexService .indexDocuments(None , Some (grepBundle) )
147+ componentRegistry.nodeIndexService .indexDocuments(None , indexingBundle )
136148 },
137- " grep " ,
149+ " nodes " ,
138150 ),
139151 )
140152 ),
0 commit comments