From 4ec1e7b90f42b2e322127bd2bd17e7b9446aba0d Mon Sep 17 00:00:00 2001 From: Braden MacDonald Date: Mon, 4 May 2026 17:48:40 -0700 Subject: [PATCH 1/4] fix: "Explore courses" search wasn't working with Typesense --- search/typesense.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/search/typesense.py b/search/typesense.py index ad5880a7..0802bf3e 100644 --- a/search/typesense.py +++ b/search/typesense.py @@ -192,7 +192,7 @@ def process_document(self, doc: dict[str, t.Any]) -> dict[str, t.Any]: def search( self, - query_string="", + query_string: str | None = "", field_dictionary=None, filter_dictionary=None, exclude_dictionary=None, @@ -221,7 +221,7 @@ def search( # just using filters). index_config = INDEX_CONFIGURATION[self.index_name] query_by = index_config["query_fields"] - search_args = {"q": query_string, "query_by": query_by, **compiled_params} + search_args = {"q": query_string or "", "query_by": query_by, **compiled_params} try: results = self.typesense_index.documents.search(search_args) except (RequestMalformed, httpx.InvalidURL) as err: From 4321050e4034f56fbb17b8c4e0ade54abe971eeb Mon Sep 17 00:00:00 2001 From: Braden MacDonald Date: Mon, 4 May 2026 18:11:04 -0700 Subject: [PATCH 2/4] docs: update readme section about typesense --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c9f75e03..2fff1a3e 100644 --- a/README.md +++ b/README.md @@ -22,11 +22,16 @@ See the full compatibility table at https://github.com/typesense/typesense-pytho ### Enabling the Typesense engine +If you're using Tutor, the easiest way to use Typesense is to install [tutor-contrib-typesense](https://github.com/open-craft/tutor-contrib-typesense/). To configure it manually, you'll need to update these CMS/LMS settings: + ```python SEARCH_ENGINE = "search.typesense.TypesenseEngine" +FORUM_SEARCH_BACKEND = "forum.search.typesense.TypesenseBackend" +TYPESENSE_URLS = ["http://typesense:8108"] +TYPESENSE_PUBLIC_URL = "http://typesense.example.com:8108" +TYPESENSE_API_KEY: "..." ``` -You will also need to configure the Typesense connection in your Django settings (host, port, API key). After switching, create the indices using the shell (no management command exists yet — see https://github.com/openedx/edx-platform/issues/36868 for the longer-term plan): From c2f9ef961171b0c01ca9663062a0f55ca9d7f9cb Mon Sep 17 00:00:00 2001 From: Braden MacDonald Date: Tue, 5 May 2026 09:44:10 -0700 Subject: [PATCH 3/4] docs: link to official typesense setup instructions --- README.md | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 2fff1a3e..be7f438b 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,13 @@ This is a django application to provide access to search services from within ed Searching is accomplished by creating an index of documents, and then searching within that index for matching information. This application provides a way to add documents to the index, and then search for them. +## Meilisearch Engine + +edx-search includes full support for Meilisearch, and it is the default search engine in recent Open edX releases. + ## Typesense Engine -edx-search includes an optional `TypesenseEngine` backend (`search.typesense.TypesenseEngine`). +edx-search includes an optional `TypesenseEngine` backend (`search.typesense.TypesenseEngine`), which can be used as an alternative to Meilisearch or Elasticsearch. See ["Use Typesense search backend"](https://docs.openedx.org/en/latest/site_ops/how-tos/use_typesense_search_backend.html) in the site operator documentation for instructions on setting it up, if you'd like to use it. ### Server version requirement @@ -20,25 +24,6 @@ If you are running an older Typesense server you must upgrade it before deployin See the full compatibility table at https://github.com/typesense/typesense-python#compatibility. -### Enabling the Typesense engine - -If you're using Tutor, the easiest way to use Typesense is to install [tutor-contrib-typesense](https://github.com/open-craft/tutor-contrib-typesense/). To configure it manually, you'll need to update these CMS/LMS settings: - -```python -SEARCH_ENGINE = "search.typesense.TypesenseEngine" -FORUM_SEARCH_BACKEND = "forum.search.typesense.TypesenseBackend" -TYPESENSE_URLS = ["http://typesense:8108"] -TYPESENSE_PUBLIC_URL = "http://typesense.example.com:8108" -TYPESENSE_API_KEY: "..." -``` - -After switching, create the indices using the shell (no management command exists yet — see -https://github.com/openedx/edx-platform/issues/36868 for the longer-term plan): - -```shell -./manage.py lms shell -c "import search.typesense; search.typesense.create_indexes()" -``` - ## SearchEngine The SearchEngine is an abstract object which may have multiple implementations. As of Verawood, there are four in existence: From 8cf6a6e188542b50a0046b88c71e61a85b47f2bf Mon Sep 17 00:00:00 2001 From: Braden MacDonald Date: Thu, 7 May 2026 10:12:14 -0700 Subject: [PATCH 4/4] feat: bump version to `5.0.1` (bugfix release) --- edxsearch/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edxsearch/__init__.py b/edxsearch/__init__.py index ffaf23fc..e64c0723 100644 --- a/edxsearch/__init__.py +++ b/edxsearch/__init__.py @@ -1,3 +1,3 @@ """ Container module for testing / demoing search """ -__version__ = '5.0.0' +__version__ = '5.0.1'