diff options
author | Till <2353100+S7evinK@users.noreply.github.com> | 2022-09-27 18:06:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-27 18:06:49 +0200 |
commit | 87be32ca2671173a4287a938932e543410a32c3a (patch) | |
tree | 92d74544fccf5f51873db4f55c04045562990b35 /syncapi/syncapi.go | |
parent | 6c67552bf9eee18f656d731adf646aa09c5d7c92 (diff) |
Fulltext implementation using Bleve (#2675)
Based on #2480
This actually indexes events based on their event type. They are removed
from the index if we receive a `m.room.redaction` event on the
`OutputRoomEvent` stream.
An admin endpoint is added to reindex all existing events.
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
Diffstat (limited to 'syncapi/syncapi.go')
-rw-r--r-- | syncapi/syncapi.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/syncapi/syncapi.go b/syncapi/syncapi.go index f5d00f36..be19310f 100644 --- a/syncapi/syncapi.go +++ b/syncapi/syncapi.go @@ -88,14 +88,15 @@ func AddPublicRoutes( roomConsumer := consumers.NewOutputRoomEventConsumer( base.ProcessContext, cfg, js, syncDB, notifier, streams.PDUStreamProvider, - streams.InviteStreamProvider, rsAPI, + streams.InviteStreamProvider, rsAPI, base.Fulltext, ) if err = roomConsumer.Start(); err != nil { logrus.WithError(err).Panicf("failed to start room server consumer") } clientConsumer := consumers.NewOutputClientDataConsumer( - base.ProcessContext, cfg, js, syncDB, notifier, streams.AccountDataStreamProvider, + base.ProcessContext, cfg, js, natsClient, syncDB, notifier, + streams.AccountDataStreamProvider, base.Fulltext, ) if err = clientConsumer.Start(); err != nil { logrus.WithError(err).Panicf("failed to start client data consumer") @@ -131,6 +132,6 @@ func AddPublicRoutes( routing.Setup( base.PublicClientAPIMux, requestPool, syncDB, userAPI, - rsAPI, cfg, base.Caches, + rsAPI, cfg, base.Caches, base.Fulltext, ) } |