Skip to content

Commit 215b5ad

Browse files
committed
feat: migrate to Meilisearch
We make use of a new search engine to search annotations. The index will automatically be created and filled during init. This is considered a breaking change if you have customised your notes index.
1 parent fb0477a commit 215b5ad

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
- [Bugfix] Actually mount edx-notes-api repositories from host on `tutor mounts add /path/to/edx-notes-api`. (by @regisb)
2+
- 💥[Feature] Replace Elasticsearch by Meilisearch. The implementation is much more compact and readable. All content will be automatically re-indexed during init. (by @regisb)

tutornotes/templates/notes/apps/settings/tutor.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@
2323
CLIENT_ID = "notes"
2424
CLIENT_SECRET = "{{ NOTES_OAUTH2_SECRET }}"
2525

26-
ELASTICSEARCH_DSL = {
27-
'default': {
28-
'hosts': '{{ ELASTICSEARCH_SCHEME }}://{{ ELASTICSEARCH_HOST }}:{{ ELASTICSEARCH_PORT }}'
29-
}
30-
}
26+
# Meilisearch credentials
27+
ES_DISABLED = True
28+
MEILISEARCH_ENABLED = True
29+
MEILISEARCH_URL = "{{ MEILISEARCH_URL }}"
30+
MEILISEARCH_API_KEY = "{{ MEILISEARCH_API_KEY }}"
31+
MEILISEARCH_INDEX = "{{ MEILISEARCH_INDEX_PREFIX }}student_notes"
3132

3233
LOGGING = {
3334
"version": 1,
+3-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
./manage.py migrate
2-
./manage.py search_index --rebuild -f
2+
3+
# Re-index with meilisearch
4+
./manage.py shell -c "from notesapi.v1.views.meilisearch import reindex; reindex()"

0 commit comments

Comments
 (0)