Commit bc5ed96
committed
feat: add Typesense backend for search
Support searching forum threads and comments using Typesense as
a backend.
This is completely backwards compatible; Meilisearch can
still be used as the backend with no changes, and existing installations
will continue to be configured to use Meilisearch.
The new backend can be enabled by setting:
```py
TYPESENSE_ENABLED = True
```
You can also manually set the backend for testing with something like:
```py
FORUM_SEARCH_BACKEND = "forum.search.typesense.TypesenseBackend"
```
Configuring the Typesense backend can be done with these settings:
```py
TYPESENSE_API_KEY = "your-secret-api-key"
TYPESENSE_URLS = ["https://typesense-1.example.com:8108", "https://typesense-2.example.com:8108"]
```
The actual implementation differs from the Meilisearch backend
in some areas, mostly for internal efficiency.
For example, a single index is used to cover both threads and comments,
while Meilisearch uses two.
It aims to produce comparable results for searches by end users though.
Private-ref: https://tasks.opencraft.com/browse/BB-99751 parent a5f31e6 commit bc5ed96
12 files changed
Lines changed: 499 additions & 2 deletions
File tree
- docs/how-tos
- forum
- search
- settings
- requirements
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
0 commit comments