$npx skillfedfor your agent

modelsearch

A library for indexing Django models with Elasicsearch, OpenSearch or database and searching them with the Django ORM.

Worth itPyPI Python ModulesReleased Aug 2026534.2K downloads / moBSD-3-ClausePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — modelsearch-1.3.2-py3-none-any.whl
v1.3.2 · released 2026-08-11 · Python >=3.10 · 2 runtime deps: Django, django-tasks

Yes. The package is actively maintained, has low install friction, carries a permissive license, and solves a real problem—letting you write search queries in Django ORM syntax regardless of backend. It's production-ready (marked stable, extracted from Wagtail's proven codebase), has no known vulnerabilities, and supports modern Python versions. Install it if you need flexible, backend-agnostic search on Django models.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10+; if using PostgreSQL, django.contrib.postgres must be in INSTALLED_APPS; run `django-admin rebuild_modelsearch_index` to initialize indexes.
  • Low friction: pure Python wheel with only Django and django-tasks as runtime dependencies.
  • Actively maintained since March 2025 with recent commits and no known vulnerabilities.

License · maintenance · safety

BSD-3-Clause (permissive) — BSD-3-Clause (permissive): you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

last release 2026-08-11 (3 days) · last repo commit 2026-08-11 · 95 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 534,200 downloads/mo, #6,137 on PyPI

Verify before relying

pip install modelsearch

# settings.py
INSTALLED_APPS = [
    'modelsearch',
    'django.contrib.postgres',  # if using PostgreSQL
]

# models.py
from modelsearch import index
from modelsearch.queryset import SearchableQuerySetMixin

class SongQuerySet(SearchableQuerySetMixin, models.QuerySet):
    pass

class Song(index.Indexed, models.Model):
    name = models.TextField()
    search_fields = [index.SearchField('name', boost=2.0)]
    objects = SongQuerySet.as_manager()

# Then search
Song.objects.search("query")
  • Whether django-tasks is a hard runtime requirement or optional for background indexing.
  • Performance characteristics and scaling limits with large datasets or high query volume.
  • Compatibility matrix details for specific Elasticsearch/OpenSearch versions beyond the documented 7.x, 8.x, 9.x and 2.x, 3.x ranges.
Same gist for agents: .md · .json

What it is and what it does

Django ModelSearch is a search indexing layer for Django that lets you index your models into Elasticsearch, OpenSearch, or your existing database (PostgreSQL FTS, MySQL FTS, MariaDB FTS, SQLite FTS5) and then query them through the familiar Django ORM. Instead of writing raw search queries, you call `.search()` on a QuerySet just like you would `.filter()`, and the library translates that into the appropriate backend query.

It was built into Wagtail CMS since 2014 and extracted as a standalone package in March 2025. The library handles index synchronization via Django signals, supports zero-downtime index rebuilds using aliases, and integrates with Django's pagination and filtering ecosystem. You define searchable fields on your models with optional per-field boosting, filter fields for fast faceting, and can pull content from related models into the index.

Use it for

  • Build a product catalog search that works across PostgreSQL, Elasticsearch, or SQLite without rewriting query logic for each backend.
  • Add autocomplete and fuzzy search to a Django admin or user-facing search form with faceted results.
  • Index large text fields (articles, documentation, logs) and search them with phrase queries and field-specific relevance tuning.
  • Migrate search from database FTS to Elasticsearch for performance without changing application code.
  • Combine full-text search with Django filters and pagination in a single QuerySet chain.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

The package is actively maintained, has low install friction, carries a permissive license, and solves a real problem—letting you write search queries in Django ORM syntax regardless of backend. It's production-ready (marked stable, extracted from Wagtail's proven codebase), has no known vulnerabilities, and supports modern Python versions. Install it if you need flexible, backend-agnostic search on Django models.

Install

modelsearch on PyPI

Before you install

Low friction: pure Python wheel with only Django and django-tasks as runtime dependencies. Actively maintained since March 2025 with recent commits and no known vulnerabilities.

Requires Python 3.10+; if using PostgreSQL, django.contrib.postgres must be in INSTALLED_APPS; run `django-admin rebuild_modelsearch_index` to initialize indexes.

License in practice

BSD-3-Clause (permissive): you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install modelsearch

# settings.py
INSTALLED_APPS = [
    'modelsearch',
    'django.contrib.postgres',  # if using PostgreSQL
]

# models.py
from modelsearch import index
from modelsearch.queryset import SearchableQuerySetMixin

class SongQuerySet(SearchableQuerySetMixin, models.QuerySet):
    pass

class Song(index.Indexed, models.Model):
    name = models.TextField()
    search_fields = [index.SearchField('name', boost=2.0)]
    objects = SongQuerySet.as_manager()

# Then search
Song.objects.search("query")

Verify before relying

  • Whether django-tasks is a hard runtime requirement or optional for background indexing.
  • Performance characteristics and scaling limits with large datasets or high query volume.
  • Compatibility matrix details for specific Elasticsearch/OpenSearch versions beyond the documented 7.x, 8.x, 9.x and 2.x, 3.x ranges.

Package facts

LicenseBSD-3-Clause permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
Djangodjango-tasks
MaintenanceActively maintained 3 days since the last release
Last repo commit
First released
Downloads534,200 / month, #6,137 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Software Development :: Libraries :: Python Modules

Evidence: modelsearch-1.3.2-py3-none-any.whl

Tags

Capabilities
django model search indexingelasticsearch django ormfull-text search djangodjango database searchopensearch django integrationdjango queryset searchfuzzy search django models
Topics
search-indexingorm-integrationelasticsearch

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “elasticsearch django orm”

  • modelsearchIndexes Django models into Elasticsearch, OpenSearch, or native…
  • elasticsearch8-dslA high-level Python query builder for Elasticsearch that translates…
  • pygeofilterParses OGC filtering standards (CQL, CQL JSON, JFE, FES) into an…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also django-elasticsearch-dsl · django-haystack · sqlalchemy-searchable · django-ordered-model · django-opensearch-dsl · typesense · django-filter · django-mysql · Whoosh · djangoql