Search lets you retrieve docs from a workspace by keyword, meaning, or both. Three modes are available.
Full-text search¶⎘
fts mode matches docs whose body contains the query terms. Results are ranked by lexical relevance--docs where the terms appear more frequently or in more prominent positions rank higher. This is the default mode for the CLI.
Via API:
GET /api/o/:org/w/:ws/search?q=config+reload&mode=fts
Via CLI:
mds search config reload
mds search --mode=fts config reload
Similarity search¶⎘
sim mode ranks docs by how closely their meaning matches the query, regardless of whether the exact words appear. Useful when you know roughly what a doc is about but not what it's called.
Via API:
GET /api/o/:org/w/:ws/search?q=how+to+restart+the+server&mode=sim
Via CLI:
mds search --semantic how to restart the server
mds search --mode=sim how to restart the server
Hybrid search¶⎘
hybrid mode runs both full-text and similarity search and merges the results. This is the default mode for the API. It tends to return the broadest, most relevant set--useful when you're not sure whether the query is a precise term or a loose description.
Via API:
GET /api/o/:org/w/:ws/search?q=deployment+pipeline&mode=hybrid
Via CLI:
mds search --hybrid deployment pipeline
mds search --mode=hybrid deployment pipeline
When to pick which¶⎘
Use fts when you know exact terms (a flag name, an error code, a config key). Use sim when you have a concept but not a keyword. Use hybrid--or just omit --mode--when you're unsure; it rarely does worse than either alone.
Query syntax¶⎘
Queries are plain keywords--no boolean operators, no phrase quoting, no field filters. Whitespace-delimited tokens are treated as literals; a query like "config reload" is the same as config reload. The CLI also accepts --limit <n> to cap the result count.
The API accepts three parameters:
| Parameter | Description | Default |
|---|---|---|
q |
Query string (required). | n/a |
mode |
fts, sim, or hybrid. |
hybrid |
limit |
Max results to return. | 20 |
Workspace scope is determined by the :org and :ws path segments. There is no cross-workspace search.