Skip to content

Commit 22aeb4e

Browse files
committed
docs: document -d/--database on the search commands
1 parent d75cfc1 commit 22aeb4e

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

‎README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,10 @@ hotdata search create trips_notes_vec --type vector --from demo.public.trips \
218218
hotdata search "rides that mention lost items" --index trips_notes_vec
219219
```
220220

221+
The search commands resolve the index in the active database (`hotdata databases
222+
use <id>`); pass `-d/--database <id>` to target another, or when no active
223+
database is set.
224+
221225
System embedding providers come pre-configured; bring your own with
222226
`hotdata search embeddings add`.
223227

‎skills/hotdata/subskills/search/SKILL.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ Both run server-side. The search action addresses an index **by name** (`--index
2121
```bash
2222
# BM25 / text (requires a text index; address it by name)
2323
hotdata search "<query>" --index <name> \
24-
[--select <columns>] [--limit <n>] [--workspace-id <workspace_id>] [--output table|json|csv]
24+
[--database <db-id>] [--select <columns>] [--limit <n>] [--workspace-id <workspace_id>] [--output table|json|csv]
2525

2626
# Vector (requires a vector index; server auto-embeds the query text)
2727
hotdata search "<query>" --index <name> \
28-
[--select <columns>] [--limit <n>] [--workspace-id <workspace_id>] [--output table|json|csv]
28+
[--database <db-id>] [--select <columns>] [--limit <n>] [--workspace-id <workspace_id>] [--output table|json|csv]
2929

3030
# --in is an accepted alias for --index
3131
hotdata search "<query>" --in <name>
@@ -40,6 +40,7 @@ hotdata search "<query>" --in <name>
4040
- **Custom embedding model, raw query vector, or no vector index?** Use `hotdata query` directly (e.g. `cosine_distance(col, [<vec>])`) — `search` only auto-embeds the query text via the index's own provider.
4141
- **Before search:** create the right index (`search create <name> --type text` or `--type vector`). See [references/INDEXES.md](references/INDEXES.md).
4242
- Default `--limit` is 10.
43+
- **Database:** the search commands resolve the index in the **active** database (`hotdata databases use <id>`). Pass `-d/--database <id>` to target a different database explicitly — it is required when no active database is set. The same `-d/--database` works on `search show` and `search remove`.
4344
- **Active database:** with `hotdata databases use <db>`, an index created with a `schema.table` `--from` resolves the active database's catalog automatically. Or create it with the full `catalog.schema.table` form. Do **not** use the internal `__db_<id>` label or raw catalog ID prefix — `bm25_search`/`vector_distance` resolve a catalog attached to the active database, so an `__db_…` or `conn…` prefix errors with *catalog … is not attached*.
4445

4546
---

0 commit comments

Comments
 (0)