diff options
author | Till <2353100+S7evinK@users.noreply.github.com> | 2022-09-07 18:15:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-07 18:15:54 +0200 |
commit | d5876abbe9f5484768f603ec91a567b8650e6e73 (patch) | |
tree | e8288bac7557a840ed636391ce5afbc7059dc993 /test/testrig/base.go | |
parent | 31f4ae8997af7e939f505107341b86b2abd3fd9a (diff) |
Fulltext implementation incl. config (#2480)
This adds the main component of the fulltext search.
This PR doesn't do anything yet, besides creating an empty fulltextindex
folder if enabled. Indexing events is done in a separate PR.
Diffstat (limited to 'test/testrig/base.go')
-rw-r--r-- | test/testrig/base.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/testrig/base.go b/test/testrig/base.go index 9747ea60..10cc2407 100644 --- a/test/testrig/base.go +++ b/test/testrig/base.go @@ -22,10 +22,11 @@ import ( "strings" "testing" + "github.com/nats-io/nats.go" + "github.com/matrix-org/dendrite/setup/base" "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/test" - "github.com/nats-io/nats.go" ) func CreateBaseDendrite(t *testing.T, dbType test.DBType) (*base.BaseDendrite, func()) { @@ -45,6 +46,10 @@ func CreateBaseDendrite(t *testing.T, dbType test.DBType) (*base.BaseDendrite, f Generate: true, Monolithic: true, }) + cfg.SyncAPI.Fulltext.Defaults(config.DefaultOpts{ // use in memory fts + Generate: true, + Monolithic: true, + }) cfg.Global.ServerName = "test" // use a distinct prefix else concurrent postgres/sqlite runs will clash since NATS will use // the file system event with InMemory=true :( @@ -100,6 +105,7 @@ func Base(cfg *config.Dendrite) (*base.BaseDendrite, nats.JetStreamContext, *nat }) } cfg.Global.JetStream.InMemory = true + cfg.SyncAPI.Fulltext.InMemory = true base := base.NewBaseDendrite(cfg, "Tests") js, jc := base.NATS.Prepare(base.ProcessContext, &cfg.Global.JetStream) return base, js, jc |