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
| queryExpansion | QueryExpansionOptions |false|false| Query expansion with user-provided synonym map. false disables. Without synonyms, expansion is a no-op. |
Use `readOnly: true` when `.zvec` files are prepared elsewhere and the current
105
+
process should only query them:
106
+
107
+
```typescript
108
+
const ctx = await Context.create({
109
+
vectorsDir: '.context/vectors',
110
+
readOnly: true,
111
+
});
112
+
113
+
const results = await ctx.query('How to configure a line chart', { library: 'g2' });
114
+
```
115
+
116
+
In read-only mode, `Context` opens existing `${library}.zvec` files with
117
+
`ZVecOpen`. It does not create missing stores, and `load()` will throw because
118
+
it would mutate the zvec file.
119
+
101
120
### `ctx.load(library, pattern)`
102
121
103
122
Load files into a specified library with automatic batch vectorization. Documents are embedded in batches and inserted into the vector store. A content-hash change detection mechanism re-embeds files whose content has changed since the last load.
0 commit comments