mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-11 08:03:09 -06:00
Update configs
This commit is contained in:
parent
5f0f774fb5
commit
f51755195c
|
|
@ -275,10 +275,15 @@ sync_api:
|
|||
# address of the client. This is likely required if Dendrite is running behind
|
||||
# a reverse proxy server.
|
||||
# real_ip_header: X-Real-IP
|
||||
fulltext:
|
||||
|
||||
# Configuration for the fulltext search
|
||||
search:
|
||||
enabled: false
|
||||
# The path where the fulltext index will be created in.
|
||||
index_path: "./fulltextindex"
|
||||
language: "en" # more possible languages can be found at https://github.com/blevesearch/bleve/tree/master/analysis/lang
|
||||
# The language most likely to be used on the server - used when indexing, to ensure the returned results match the expectations.
|
||||
# A full list of possible languages can be found at https://github.com/blevesearch/bleve/tree/master/analysis/lang
|
||||
language: "en"
|
||||
|
||||
# Configuration for the User API.
|
||||
user_api:
|
||||
|
|
|
|||
|
|
@ -326,10 +326,15 @@ sync_api:
|
|||
max_open_conns: 10
|
||||
max_idle_conns: 2
|
||||
conn_max_lifetime: -1
|
||||
fulltext:
|
||||
|
||||
# Configuration for the fulltext search
|
||||
search:
|
||||
enabled: false
|
||||
# The path where the fulltext index will be created in.
|
||||
index_path: "./fulltextindex"
|
||||
language: "en" # more possible languages can be found at https://github.com/blevesearch/bleve/tree/master/analysis/lang
|
||||
# The language most likely to be used on the server - used when indexing, to ensure the returned results match the expectations.
|
||||
# A full list of possible languages can be found at https://github.com/blevesearch/bleve/tree/master/analysis/lang
|
||||
language: "en"
|
||||
|
||||
# This option controls which HTTP header to inspect to find the real remote IP
|
||||
# address of the client. This is likely required if Dendrite is running behind
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ type SyncAPI struct {
|
|||
|
||||
RealIPHeader string `yaml:"real_ip_header"`
|
||||
|
||||
Fulltext Fulltext `yaml:"fulltext"`
|
||||
Fulltext Fulltext `yaml:"search"`
|
||||
}
|
||||
|
||||
func (c *SyncAPI) Defaults(opts DefaultOpts) {
|
||||
|
|
@ -52,16 +52,12 @@ func (f *Fulltext) Defaults(opts DefaultOpts) {
|
|||
f.Enabled = false
|
||||
f.IndexPath = "./fulltextindex"
|
||||
f.Language = "en"
|
||||
if opts.Generate {
|
||||
f.Enabled = true
|
||||
f.InMemory = true
|
||||
}
|
||||
}
|
||||
|
||||
func (f *Fulltext) Verify(configErrs *ConfigErrors, isMonolith bool) {
|
||||
if !f.Enabled {
|
||||
return
|
||||
}
|
||||
checkNotEmpty(configErrs, "syncapi.fulltext.index_path", string(f.IndexPath))
|
||||
checkNotEmpty(configErrs, "syncapi.fulltext.language", f.Language)
|
||||
checkNotEmpty(configErrs, "syncapi.search.index_path", string(f.IndexPath))
|
||||
checkNotEmpty(configErrs, "syncapi.search.language", f.Language)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue