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: .changeset/eleven-crews-pull.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,4 +13,4 @@
13
13
14
14
**Import form label reset** (`rushdb-dashboard`): The label field in the import data page is now cleared whenever the user goes back to the method-selection step, uploads a new file, or switches to the CSV editor — preventing stale labels from persisting across import iterations.
15
15
16
-
**Docs updated for three surfaces** (`docs`): `indexing.md` revised to reflect that index creation no longer requires the property to already exist. `write-with-vectors.mdx`documents the flat `VectorEntry[]` overload. `semantic-search.mdx` mentions the `record.score` convenience getter.
16
+
**Docs updated** (`docs`): `indexing.md` revised to reflect that index creation no longer requires the property to already exist. `write-with-vectors.mdx`and `bring-your-own-vectors.mdx` document the flat `VectorEntry[]` overload. `semantic-search.mdx` mentions the `record.score` convenience getter. TS reference docs (`RushDB.md`, `DBRecordInstance.md`) describe the flat `vectors` form and the `score` getter. Python reference docs (`RushDB.md`) mention the flat `vectors` form. All tutorial code examples (15 `.mdx` files) now prefer the `.score` getter over raw `__score` access. `manage-indexes.mdx` error reference updated to remove the stale 404 row (property no longer needs to exist). All incorrect `where: { __id: ... }` filter patterns replaced with `where: { $id: ... }` across 12 tutorial files (TS, Python, and Shell code blocks).
|`import_json(data, label, *, options, transaction)`| Import nested/complex JSON payloads; `label` may be omitted for container objects whose top-level values are objects or arrays of nested records |
49
-
|`import_csv(label, data, *, options, parse_config, vectors, transaction)`| Import records from CSV text |
50
-
|`upsert(data, label, *, options, vectors, transaction)`| Create or update a record |
51
-
|`set(target, data, *, label, vectors, transaction)`| Replace all fields of a record |
52
-
|`update(target, data, *, transaction)`| Partially update a record |
|`create(label, data, *, options, vectors, transaction)`| Create a single record |
47
+
|`create_many(label, data, *, options, vectors, transaction)`| Create multiple flat records. `vectors` accepts both a flat list of dicts (one per row, auto-wrapped) and a nested list of lists (explicit per-row entries)|
48
+
|`import_json(data, label, *, options, transaction)`| Import nested/complex JSON payloads; `label` may be omitted for container objects whose top-level values are objects or arrays of nested records |
49
+
|`import_csv(label, data, *, options, parse_config, vectors, transaction)`| Import records from CSV text |
50
+
|`upsert(data, label, *, options, vectors, transaction)`| Create or update a record |
51
+
|`set(target, data, *, label, vectors, transaction)`| Replace all fields of a record |
52
+
|`update(target, data, *, transaction)`| Partially update a record |
Copy file name to clipboardExpand all lines: docs/docs/learn/reference/typescript/DBRecordInstance.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
@@ -45,6 +45,28 @@ data?: DBRecordInferred<S, Q>
45
45
46
46
The actual record data, which may include computed metric fields if the record was retrieved via a query with select/groupBy. The legacy aggregate clause is deprecated and only present for vector similarity until select supports it.
47
47
48
+
### score
49
+
50
+
```typescript
51
+
getscore(): number|undefined
52
+
```
53
+
54
+
Relevance score from a vector/semantic search result. Returns `undefined` for records fetched outside of `records.vectorSearch()`.
55
+
56
+
**Example:**
57
+
58
+
```typescript
59
+
const results =awaitdb.records.vectorSearch({
60
+
labels: ['DOC'],
61
+
propertyName: 'content',
62
+
query: 'machine learning',
63
+
limit: 10
64
+
})
65
+
results.forEach((r) => {
66
+
console.log(r.score) // e.g. 0.9214; undefined for non-vector results
|`importJson({ label, data, options }, transaction)`| Import nested or complex JSON payloads; `label` may be omitted for container objects whose top-level values are objects or arrays of nested records |
58
-
|`importCsv({ label, data, options, parseConfig, parentId, vectors }, transaction)`| Import records from CSV text; supports upsert via `options.mergeBy`|
59
-
|`upsert({ label, data, options, vectors }, transaction)`| Create or update a record by properties in `options.mergeBy`|
60
-
|`set({ target, label, data, options, vectors }, transaction)`| Replace all fields of a record |
61
-
|`update({ target, label, data, options }, transaction)`| Partially update a record |
62
-
|`find(searchQuery, transaction)`| Search records |
63
-
|`findOne(searchQuery, transaction)`| Return the first match |
64
-
|`findUniq(searchQuery, transaction)`| Return the single match; raises if ambiguous |
65
-
|`findById(idOrIds, transaction)`| Fetch record(s) by ID |
66
-
|`delete(searchQuery, transaction)`| Delete all records matching a query |
67
-
|`deleteById(idOrIds, transaction)`| Delete record(s) by ID |
68
-
|`attach({ source, target, options }, transaction)`| Create relationships between records |
69
-
|`detach({ source, target, options }, transaction)`| Remove relationships between records |
70
-
|`export(searchQuery, transaction)`| Export matching records as CSV text |
|`create({ label, data, options, vectors }, transaction)`| Create a single record |
56
+
|`createMany({ label, data, options, vectors }, transaction)`| Create multiple flat records; supports upsert via `options.mergeBy`. `vectors` accepts both `VectorEntry[]` (one per row, auto-wrapped) and `VectorEntry[][]` (explicit per-row lists)|
57
+
|`importJson({ label, data, options }, transaction)`| Import nested or complex JSON payloads; `label` may be omitted for container objects whose top-level values are objects or arrays of nested records |
58
+
|`importCsv({ label, data, options, parseConfig, parentId, vectors }, transaction)`| Import records from CSV text; supports upsert via `options.mergeBy`|
59
+
|`upsert({ label, data, options, vectors }, transaction)`| Create or update a record by properties in `options.mergeBy`|
60
+
|`set({ target, label, data, options, vectors }, transaction)`| Replace all fields of a record |
61
+
|`update({ target, label, data, options }, transaction)`| Partially update a record |
62
+
|`find(searchQuery, transaction)`| Search records |
63
+
|`findOne(searchQuery, transaction)`| Return the first match |
64
+
|`findUniq(searchQuery, transaction)`| Return the single match; raises if ambiguous |
65
+
|`findById(idOrIds, transaction)`| Fetch record(s) by ID |
66
+
|`delete(searchQuery, transaction)`| Delete all records matching a query |
67
+
|`deleteById(idOrIds, transaction)`| Delete record(s) by ID |
68
+
|`attach({ source, target, options }, transaction)`| Create relationships between records |
69
+
|`detach({ source, target, options }, transaction)`| Remove relationships between records |
70
+
|`export(searchQuery, transaction)`| Export matching records as CSV text |
71
71
72
72
For bulk imports, pass `options: { mergeBy: ['propertyName'], mergeStrategy: 'append' | 'rewrite' }` to upsert by property instead of creating duplicates. See [Upsert by Property During Import](/learn/records-and-queries/import-data#upsert-by-property-during-import).
0 commit comments