mirror of
https://github.com/1f349/dendrite.git
synced 2024-11-09 22:42:58 +00:00
Update search docs
This commit is contained in:
parent
87be32ca26
commit
34993717fd
@ -85,7 +85,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
cfg.SyncAPI.Fulltext = config.Fulltext{
|
cfg.SyncAPI.Fulltext = config.Fulltext{
|
||||||
Enabled: true,
|
Enabled: true,
|
||||||
IndexPath: config.Path(filepath.Join(*dirPath, "fulltextindex")),
|
IndexPath: config.Path(filepath.Join(*dirPath, "searchindex")),
|
||||||
InMemory: true,
|
InMemory: true,
|
||||||
Language: "en",
|
Language: "en",
|
||||||
}
|
}
|
||||||
|
@ -276,13 +276,17 @@ sync_api:
|
|||||||
# a reverse proxy server.
|
# a reverse proxy server.
|
||||||
# real_ip_header: X-Real-IP
|
# real_ip_header: X-Real-IP
|
||||||
|
|
||||||
# Configuration for the fulltext search
|
# Configuration for the full-text search engine.
|
||||||
search:
|
search:
|
||||||
|
# Whether or not search is enabled.
|
||||||
enabled: false
|
enabled: false
|
||||||
# The path where the fulltext index will be created in.
|
|
||||||
index_path: "./fulltextindex"
|
# The path where the search index will be created in.
|
||||||
# The language most likely to be used on the server - used when indexing, to ensure the returned results match the expectations.
|
index_path: "./searchindex"
|
||||||
# A full list of 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 expectations. A full list of possible languages
|
||||||
|
# can be found at https://github.com/blevesearch/bleve/tree/master/analysis/lang
|
||||||
language: "en"
|
language: "en"
|
||||||
|
|
||||||
# Configuration for the User API.
|
# Configuration for the User API.
|
||||||
|
@ -327,13 +327,17 @@ sync_api:
|
|||||||
max_idle_conns: 2
|
max_idle_conns: 2
|
||||||
conn_max_lifetime: -1
|
conn_max_lifetime: -1
|
||||||
|
|
||||||
# Configuration for the fulltext search
|
# Configuration for the full-text search engine.
|
||||||
search:
|
search:
|
||||||
|
# Whether or not search is enabled.
|
||||||
enabled: false
|
enabled: false
|
||||||
# The path where the fulltext index will be created in.
|
|
||||||
index_path: "./fulltextindex"
|
# The path where the search index will be created in.
|
||||||
# The language most likely to be used on the server - used when indexing, to ensure the returned results match the expectations.
|
index_path: "./searchindex"
|
||||||
# A full list of 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 expectations. A full list of possible languages
|
||||||
|
# can be found at https://github.com/blevesearch/bleve/tree/master/analysis/lang
|
||||||
language: "en"
|
language: "en"
|
||||||
|
|
||||||
# This option controls which HTTP header to inspect to find the real remote IP
|
# This option controls which HTTP header to inspect to find the real remote IP
|
||||||
|
@ -138,16 +138,18 @@ room_server:
|
|||||||
conn_max_lifetime: -1
|
conn_max_lifetime: -1
|
||||||
```
|
```
|
||||||
|
|
||||||
## Fulltext search
|
## Full-text search
|
||||||
|
|
||||||
Dendrite supports experimental fulltext indexing using [Bleve](https://github.com/blevesearch/bleve), it is configured in the `sync_api` section as follows. Depending on the language most likely to be used on the server, it might make sense to change the `language` used when indexing, to ensure the returned results match the expectations. A full list of possible languages can be found [here](https://github.com/blevesearch/bleve/tree/master/analysis/lang).
|
Dendrite supports experimental full-text indexing using [Bleve](https://github.com/blevesearch/bleve). It is configured in the `sync_api` section as follows.
|
||||||
|
|
||||||
|
Depending on the language most likely to be used on the server, it might make sense to change the `language` used when indexing, to ensure the returned results match the expectations. A full list of possible languages can be found [here](https://github.com/blevesearch/bleve/tree/master/analysis/lang).
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
sync_api:
|
sync_api:
|
||||||
# ...
|
# ...
|
||||||
search:
|
search:
|
||||||
enabled: false
|
enabled: false
|
||||||
index_path: "./fulltextindex"
|
index_path: "./searchindex"
|
||||||
language: "en"
|
language: "en"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ type Fulltext struct {
|
|||||||
|
|
||||||
func (f *Fulltext) Defaults(opts DefaultOpts) {
|
func (f *Fulltext) Defaults(opts DefaultOpts) {
|
||||||
f.Enabled = false
|
f.Enabled = false
|
||||||
f.IndexPath = "./fulltextindex"
|
f.IndexPath = "./searchindex"
|
||||||
f.Language = "en"
|
f.Language = "en"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user