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
Copy file name to clipboardExpand all lines: CHANGELOG.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [Unreleased]
9
9
10
+
## [1.4.0] - 2026-04-08
11
+
12
+
### Added
13
+
-**World-class grep engine**: Complete rewrite of `AsyncVault.grep()` with three-signal blended scoring
14
+
-**Single-pass FTS5 OR query** (SQLite): one database round-trip regardless of keyword count, replacing the previous N+1 per-keyword search loop
15
+
-**Single-pass ILIKE + trigram query** (PostgreSQL): per-keyword CASE expressions with `GREATEST(similarity(...))` scoring
16
+
-**Three-signal scoring**: keyword coverage (Lucene coord factor as multiplier), native text rank (FTS5 bm25 / pg_trgm), term proximity (cover density ranking)
17
+
-**Keyword highlighting**: `explain_metadata.snippet` with configurable markers
18
+
-**Scoring breakdown**: `explain_metadata` includes `matched_keywords`, `hit_density`, `text_rank`, `proximity`, and `snippet`
19
+
-`StorageBackend.grep()` protocol method: dedicated storage-level grep for both SQLite and PostgreSQL backends
20
+
-`grep_utils.py`: shared utilities for FTS5 query building, keyword sanitization, snippet generation, keyword matching, and proximity scoring
21
+
-`GrepMatch` dataclass: lightweight intermediate result type for storage-to-vault layer communication
22
+
-`VaultConfig.grep_rank_weight` and `VaultConfig.grep_proximity_weight`: configurable scoring weights
23
+
- 62 new grep tests across `test_grep.py` (51 tests) and `test_grep_utils.py` (31 tests)
24
+
25
+
### Fixed
26
+
- Encryption test skip guards: `test_v1_features.py`, `test_coverage_gaps.py`, `test_encryption.py` now correctly skip when `[encryption]` extra is not installed
Copy file name to clipboardExpand all lines: docs/api-reference.md
+117-2Lines changed: 117 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# API Reference
2
2
3
-
Complete Python SDK for qp-vault v1.0.0.
3
+
Complete Python SDK for qp-vault v1.4.0.
4
4
5
5
## Constructor
6
6
@@ -101,6 +101,24 @@ Reassembles chunks in order to return the full text content. Quarantined resourc
101
101
102
102
<!-- VERIFIED: vault.py:406-420 -->
103
103
104
+
### reprocess()
105
+
106
+
```python
107
+
vault.reprocess(resource_id: str) -> Resource
108
+
```
109
+
110
+
Re-chunks and re-embeds an existing resource. Useful when the embedding model changes or chunking parameters are updated. The resource content is preserved; only chunks and embeddings are regenerated.
111
+
112
+
```python
113
+
# After switching embedding models
114
+
updated = vault.reprocess(resource.id)
115
+
assert updated.status =="indexed"
116
+
```
117
+
118
+
Emits an `UPDATE` subscriber event with `details={"reprocessed": True}`.
119
+
120
+
<!-- VERIFIED: vault.py:706-770 -->
121
+
104
122
### list()
105
123
106
124
```python
@@ -121,6 +139,26 @@ vault.list(
121
139
122
140
<!-- VERIFIED: vault.py:373-400 -->
123
141
142
+
### find_by_name()
143
+
144
+
```python
145
+
vault.find_by_name(
146
+
name: str,
147
+
*,
148
+
tenant_id: str|None=None,
149
+
collection_id: str|None=None,
150
+
) -> Resource |None
151
+
```
152
+
153
+
Case-insensitive name lookup. Returns the first matching non-deleted resource, or `None`.
154
+
155
+
```python
156
+
resource = vault.find_by_name("STRATEGY.md")
157
+
# Also matches "strategy.md", "Strategy.MD"
158
+
```
159
+
160
+
<!-- VERIFIED: vault.py:632-668 -->
161
+
124
162
### update()
125
163
126
164
```python
@@ -196,7 +234,9 @@ vault.search(
196
234
) -> list[SearchResult]
197
235
```
198
236
199
-
<!-- VERIFIED: vault.py:558-648 -->
237
+
When no embedder is configured, search automatically falls back to text-only mode (`vector_weight=0.0`, `text_weight=1.0`). This ensures search works on day one without requiring an embedding model.
Multi-keyword OR search with three-signal blended scoring. Executes a single FTS5 OR query (SQLite) or ILIKE+trigram query (PostgreSQL) regardless of keyword count.
Register a callback for vault mutation events. Returns an unsubscribe function. Callbacks can be sync or async; async callbacks are awaited directly. Errors in callbacks are logged and never propagated to the caller.
0 commit comments