Skip to content

Commit

Permalink
/i/index/refresh : Refresh additional index on same ElasticSearch (#4414
Browse files Browse the repository at this point in the history
)

This case was missing: The additional index can reside on the same
ElasticSearch instance as the normal/default one.
  • Loading branch information
supersven authored Jan 21, 2025
1 parent 8b85c47 commit ca0688b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion services/brig/src/Brig/User/Search/Index.hs
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,14 @@ refreshIndexes = liftIndexIO $ do
mbAddElasticEnv <- asks idxAdditionalElastic
case (mbAddIdx, mbAddElasticEnv) of
(Just addIdx, Just addElasticEnv) ->
-- Refresh additional index on a separate ElasticSearch instance.
ES.runBH addElasticEnv ((void . ES.refreshIndex) addIdx)
(_, _) -> pure ()
(Just addIdx, Nothing) ->
-- Refresh additional index on the same ElasticSearch instance.
void $ ES.refreshIndex addIdx
(Nothing, _) ->
-- No additional index
pure ()

createIndexIfNotPresent ::
(MonadIndexIO m) =>
Expand Down

0 comments on commit ca0688b

Please sign in to comment.