This commit is contained in:
Till Faelligen 2022-09-07 12:41:16 +02:00
parent aae06b80f6
commit 1b955fa1fa
No known key found for this signature in database
GPG key ID: 3DF82D8AB9211D4E

View file

@ -18,16 +18,20 @@ import (
"reflect" "reflect"
"testing" "testing"
"github.com/matrix-org/dendrite/internal/fulltext"
"github.com/matrix-org/dendrite/setup/config"
"github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/util" "github.com/matrix-org/util"
"github.com/matrix-org/dendrite/internal/fulltext"
"github.com/matrix-org/dendrite/setup/config"
) )
func mustOpenIndex(t *testing.T, tempDir string) *fulltext.Search { func mustOpenIndex(t *testing.T, tempDir string) *fulltext.Search {
t.Helper() t.Helper()
cfg := config.Fulltext{} cfg := config.Fulltext{}
cfg.Defaults(true) cfg.Defaults(config.DefaultOpts{
Generate: true,
Monolithic: true,
})
if tempDir != "" { if tempDir != "" {
cfg.IndexPath = config.Path(tempDir) cfg.IndexPath = config.Path(tempDir)
cfg.InMemory = false cfg.InMemory = false