You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pylint CI: `_parse_float_param` один return + `math.isnan`; `_stringify_numeric_param`; переносы строк в views; фикстуры через `fixture(name=...)` (W0621); pgvector/settings/tasks длина строк; `tasks.delete_instance_task` сигнатура.
4
+
5
+
DONE — `pylint $(git ls-files '*.py')` 10/10; pytest по затронутым модулям 16 passed. Полный pytest: 2 fail в `test_langgraph_search` (Searcher + LANGGRAPH), вне этого PR.
6
+
7
+
Prerelease **0.3.0a1**: `setup.cfg` + `CHANGELOG.md`; `python -m build` → `dist/*.whl` и `dist/*.tar.gz` (папка в `.gitignore`).
python manage.py purge_search_cache --dry-run # Count expired entries without deleting
177
278
```
178
279
179
280
## Admin UI
@@ -187,6 +288,9 @@ After installation, navigate to `/admin/graph-search/` for a semantic search int
187
288
| ChromaDB | Development, small-medium datasets | No |
188
289
| FAISS | High-speed CPU search, offline | No |
189
290
| Qdrant | Production, large datasets, filtering | Yes |
291
+
|**pgvector** (`django_graph_search.backends.PgvectorBackend`) | Same PostgreSQL as Django, no separate vector server | PostgreSQL + `vector` extension |
292
+
293
+
Install: `pip install django-graph-search[pgvector]`. Table is created automatically on first use (see backend docstring for `VECTOR_STORE.OPTIONS`).
190
294
191
295
## Delta Indexing & Cache
192
296
@@ -198,6 +302,14 @@ Enable `DELTA_INDEXING: True` to skip objects that haven’t changed since last
198
302
|`redis`|`OPTIONS.alias`| Production |
199
303
|`db`|`OPTIONS.alias`| Simple setup |
200
304
305
+
With **`CACHE.BACKEND: "file"`**, each delta entry stores an **`expires_at`**
306
+
timestamp derived from **`CACHE.TTL`**. Expired entries are removed **lazily** when read;
307
+
the directory can still grow if keys are never re-read — run
308
+
`python manage.py purge_search_cache` periodically (or via cron), or use
309
+
`--dry-run` to count stale files without deleting. Redis/db backends use Django’s
310
+
cache TTL and do not require this command; `purge_search_cache` only affects the
311
+
file backend.
312
+
201
313
## LangGraph-powered search pipeline (optional)
202
314
203
315
Starting with this version, `django-graph-search` ships with an **optional**
@@ -266,13 +378,23 @@ GRAPH_SEARCH = {
266
378
# ... existing config ...
267
379
"CONVERSATIONAL": {
268
380
"ENABLED": True,
269
-
"MEMORY_BACKEND": "inmemory", # or "cache" / dotted path.
381
+
"MEMORY_BACKEND": "redis",
382
+
"MEMORY_OPTIONS": {
383
+
"alias": "default", # Django CACHES alias
384
+
"key_prefix": "dgs_conv",
385
+
"ttl": 3600,
386
+
},
270
387
"MAX_HISTORY_ITEMS": 10,
271
388
"ALLOW_CLARIFICATIONS": True,
272
389
},
273
390
}
274
391
```
275
392
393
+
For local development and tests, ``MEMORY_BACKEND: "inmemory"`` is fine. With
394
+
``DEBUG=False`` (typical production), the library emits a ``RuntimeWarning`` if
395
+
in-memory mode is left enabled — switch to ``redis`` (Django cache → Redis) so
396
+
every Gunicorn worker shares the same conversation state.
0 commit comments