Commit 2b84d1a
authored
feat: add Typesense backend for search (#225)
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.
Docs about this are being added to Open edX Documentation
in openedx/docs.openedx.org#1376 ,
so that will be the source of truth.
Private-ref: https://tasks.opencraft.com/browse/BB-99751 parent a5f31e6 commit 2b84d1a
13 files changed
Lines changed: 741 additions & 2 deletions
File tree
- forum
- search
- settings
- requirements
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
0 commit comments