--- id: django-opensearch-dsl version: "0.8.0" license: Apache Software License 2.0 license_treatment: permissive maintenance: aging --- # django-opensearch-dsl — Wrapper around opensearch-py for django models License: permissive · Maintenance: aging · Downloads: 116.5K/mo ## What it is and what it does Django OpenSearch DSL is a thin wrapper around opensearch-py that allows you to define and manage search indices for Django models. It lets you declaratively map Django model fields to OpenSearch document fields, then automatically keep those indices in sync via Django signals or asynchronous Celery tasks. The package handles index creation, deletion, population, and field mapping—including complex types like nested and object fields—and provides management commands for administrative operations. You define Document classes that specify which model fields to index and how to configure the OpenSearch index itself (shards, replicas, refresh behavior). The package then manages synchronization: when a model instance is saved or deleted, the corresponding OpenSearch document is updated in real time or queued for async processing. You can query indices using the Search object from opensearch-py, making full-text search, filtering, and aggregations available to your Django application. Use it for: - Add full-text search to a Django application by indexing model fields and querying them via OpenSearch - Implement autocomplete or faceted search by leveraging OpenSearch aggregations on indexed model data - Decouple search from the primary database by maintaining a separate OpenSearch index synchronized via signals - Perform complex text analysis and linguistic queries that SQL databases cannot efficiently handle - Scale search performance independently of the main database by tuning OpenSearch shards and replicas per index ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Indexes Django model instances into OpenSearch and provides management commands and automatic signal handlers to keep indices synchronized with database changes. Yes, with conditions. The package is suitable if you need full-text search in a Django application and are willing to operate an OpenSearch cluster. Install friction is high (requires opensearch-py and a running server), and maintenance is aging (263 days since last release), but the repository is not archived and supports current Django and Python versions. No known vulnerabilities. Use it when SQL-based search is insufficient and you can commit to maintaining an OpenSearch deployment. ## Install pip install django-opensearch-dsl uv add django-opensearch-dsl poetry add django-opensearch-dsl ## Installing django-opensearch-dsl Before you install: High install friction due to opensearch-py and python-dateutil dependencies. Maintenance status is aging—last release 263 days ago, though repository remains active with recent commits and no archived status. Supports Django 4.2 through 5.2 and Python 3.9 through 3.13. License in practice: Apache Software License 2.0 is permissive, allowing commercial use and modification with minimal restrictions. Suitable for most projects without license compatibility concerns. Quickstart: pip install django-opensearch-dsl # In Django settings: OPENSEARCH_DSL = {'default': {'hosts': 'localhost:9200'}} # In documents.py: from django_opensearch_dsl import Document from django_opensearch_dsl.registries import registry @registry.register_document class MyModelDocument(Document): class Index: name = 'myindex' class Django: model = MyModel fields = ['name', 'description'] Requires a running OpenSearch instance (localhost:9200 by default). OpenSearch server must be accessible and properly configured before indexing operations. Verify before relying: - Performance characteristics of parallel indexing relative to sequential indexing for large datasets - Compatibility guarantees with specific OpenSearch versions beyond the referenced compatibility matrix - Memory overhead and query performance impact when indexing complex nested or object fields ## Package facts - License: Apache Software License 2.0 (permissive) - Python support: unspecified - Install friction: high - Maintenance: aging - Downloads: 116.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django opensearch indexing, django full-text search, opensearch model integration, django search backend, opensearch dsl django, django elasticsearch alternative, model to opensearch sync, search-indexing, django-integration, opensearch [View on SkillFed](https://skillfed.io/packages/django-opensearch-dsl) · [View on PyPI](https://pypi.org/project/django-opensearch-dsl/)