Make a Product searchable by its category__name, tags__name and brand__description β automatically. Sentence-transformers embeddings, pluggable vector backends, admin UI and REST API out of the box.
Most Django search solutions treat each model in isolation. Django Graph Search builds rich search context by walking the ORM relation graph before indexing.
Follows FK, M2M and reverse relations to a configurable depth, with per-field weights and traversal limits (MAX_RELATED_ITEMS, MAX_TEXT_LENGTH).
Sentence-transformers embeddings out of the box; OpenAI and Cohere cloud embeddings when you don't want PyTorch in your workers.
ChromaDB, FAISS, Qdrant, pgvector β one interface, upsert semantics everywhere. Switch with a single settings key.
Signals dispatch via transaction.on_commit into a bounded daemon thread pool, Celery or django-q β requests never block.
Semantic search inside /admin/, index-coverage dashboard, and a REST API with permissions, throttling and streaming.
Optional session-aware search with clarification loops, query expansion, reranking and SSE/NDJSON event streaming.
Three steps to semantic search across your models.
# 1. settings.py INSTALLED_APPS = [ ..., "django_graph_search" ] GRAPH_SEARCH = { "MODELS": [ {"model": "shop.Product", "fields": ["name", "description", "category__name", "tags__name"]}, ], "VECTOR_STORE": { "BACKEND": "django_graph_search.backends.ChromaDBBackend", "OPTIONS": {"persist_directory": "vector_db"}, }, } # 2. urls.py urlpatterns = [ path("api/search/", include("django_graph_search.urls")) ] # 3. build the index and query $ python manage.py build_search_index $ curl "http://localhost:8000/api/search/?q=red+phone&limit=5"
Same API, same document format β pick per environment. All backends re-index with upsert semantics since 0.3.4.
| Backend | Best for | Server required |
|---|---|---|
| ChromaDB | Development, small-medium datasets | No |
| FAISS | High-speed CPU search, offline, optional disk persistence | No |
| Qdrant | Production, large datasets, filtering | Yes |
| pgvector | Same PostgreSQL as Django, no separate vector server | PostgreSQL + vector |
Bug-fix & security release. Rebuild your index after upgrading.
follow_relations=True unlisted fields of the root object (e.g. the auth.User password hash) no longer end up in the index or in the REST text field; password is never indexeddistance resolution ("Cosine" used to raise), query_points on modern clientsLANGGRAPH.TIMEOUT_SECONDS enforced β hard limit around every LLM call with fallback to deterministic search/similar/ returns 404/400 for unknown model / invalid pk; stale index entries, UUID primary keys and a missing django.contrib.admin no longer crashpk__in query per model instead of one per hit:memory:, ChromaDB, FAISS end-to-end (no Docker)