Registry / database / edx-search

edx-search

JSON →
library5.0.1pypypi✓ verified 85d ago

Search and indexing routines for Open edX, supporting Elasticsearch, Meilisearch, and Typesense backends. Current version 5.0.0 as of August 2024. Release cadence is roughly quarterly.

pip install edx-search
INSTALL
IMPORT
SIG · EDX-SEARCH
E
edx-search
databasepythonv5.0.1
Install
13.1s avg
Import
648ms
Disk
154MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v5.0.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.684s · 145.7MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 13.1s · import 0.612s · 151MB
154MB installed
● package 154MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SearchEngine
from search.search_engine_base import SearchEngine
from search import SearchEngine
Direct import from top-level does not expose SearchEngine; must import from submodule.

Initialize a search engine with a Meilisearch backend (default). For Elasticsearch or Typesense, pass appropriate kwargs.

from search.search_engine_base import SearchEngine engine = SearchEngine(index_name='my_index', url='http://localhost:7700', api_key=os.environ.get('MEILI_API_KEY', ''))
Debug
Known issues
breakingVersion 5.0.0 introduces a new Typesense backend and drops Python 3.11 support (now requires Python 3.12+). Code using Django <4.2 may break.
fix
Upgrade Python to 3.12+ and update Django to >=4.2.
affects: >=5.0.0
breakingVersion 4.0.0 dropped Python 3.8 support and switched from Elasticsearch 7.x to 8.x. Connection code using old library API will fail.
fix
Update Elasticsearch client to 8.x and adjust import paths (e.g., elasticsearch8).
affects: >=4.0.0,<5.0.0
deprecatedThe 'catalog_visibility' filter in courseware_content was added in 4.1.2; earlier versions ignore it silently.
fix
Upgrade to 4.1.2+ to use this filter.
affects: <4.1.2
gotchaSearch engine initialization requires explicitly passing backend-specific kwargs (url, api_key). Omitting them defaults to Elasticsearch at localhost:9200 (no auth), which may not exist.
fix
Always provide 'url' and 'api_key' matching your backend.
affects: all
Errors
Common errors & fixes
ImportError: cannot import name 'SearchEngine' from 'search'
Top-level 'search' package does not export SearchEngine directly.
fix
Use: from search.search_engine_base import SearchEngine
TypeError: Engine.__init__() got an unexpected keyword argument 'api_key'
Elasticsearch backend does not accept 'api_key' as a keyword, but Meilisearch does.
fix
Remove 'api_key' for Elasticsearch or use 'cloud_id' and 'http_auth' for Elasticsearch 8.x.
AttributeError: 'Elasticsearch' object has no attribute 'delete_by_query'
Elasticsearch 8.x client changed API methods.
Upgrade
Version history
5.0.1latest on PyPI · released May 7, 2026
Audit
Dependencies
elasticsearchoptionalBackend for Elasticsearch support (bundled via extra or explicit)
meilisearchoptionalBackend for Meilisearch support (bundled via extra or explicit)
typesenseoptionalBackend for Typesense support (bundled via extra or explicit)
Agent activity
39 hits · last 30 days
node
30
OpenAI (training)
1
Resources
edx-search — pip install edx-search · libregistry