Skip to content

Search elements

Full-text search over title, text, properties and IDs of the elements of a selection, typo tolerant, in any case, the best first.

Command element.search. Reads the workspace and changes no file.

Field Type Required Description
query string yes Words split at spaces; every word must match (in the title, the text, a property value, the type or status name, or an ID). A word matches words it begins (from 2 letters) and with a typo (1 edit from 4 letters, 2 from 8; none for a query word with a digit), in any case. A short ID, an identifier or at least 6 hex digits of a UUID match that element exactly; ID matches come first. A query without a word finds nothing.
selection selection no Search only within it (SR-068 AK3): a view, a filter, a package or IDs.
fields array of one of "title", "text", "properties", "id" no Search only these: title, text (the Markdown text), properties (every other value, type and status names; not relations), id (UUID, short ID, identifier). Default all.
limit integer no Default: 50.
offset integer no Default: 0.
Field Type Required Description
hits array of object yes
hits[].id uuid yes Element ID: random UUID version 4, lower case, never changes (D-017, SR-002).
hits[].repository string yes Workspace name of the repository of the element.
hits[].shortId shortId yes Display ID: type prefix, dash, the trailing hex characters of the UUID with dashes removed, at least 6, more until unique in the workspace (D-017, SR-002 AK3). The file name uses 12 (D-056).
hits[].identifier string no The value of the property with the meaning identifier, when the element has one.
hits[].type key yes Fixed metamodel key of a type, property, relation kind or status value. Readable English, lower case, dashes (D-043, SR-010 AK2).
hits[].status string no The status key as written in the file.
hits[].title string yes Empty without a title.
hits[].score number yes Relevance of the matched words, rounded to 6 significant digits; 0 for an ID match only.
hits[].fields array of one of "title", "text", "properties", "id" yes What a word of the query was found in.
hits[].terms array of string yes The words of the element that matched, in lower case, for highlighting; none for an ID.
total integer yes
incomplete incomplete yes True when a result is incomplete because targets are in repositories that are not available locally (SR-006 AK2, SR-036 AK3).

In the command prompt (Ctrl+Shift+P, macOS ⌘⇧P): the action Search elements. Key: Ctrl+Shift+F (macOS ⌘⇧F).

reqseq element search, with --json for the output as JSON. Its help:

Usage: reqseq element search <query> [options]
Full-text search over title, text, properties and IDs of the elements of a
selection, typo tolerant, in any case, the best first.
Arguments:
query Words split at spaces; every word must match (in the
title, the text, a property value, the type or status
name, or an ID). A word matches words it begins (from
2 letters) and with a typo (1 edit from 4 letters, 2
from 8; none for a query word with a digit), in any
case. A short ID, an identifier or at least 6 hex
digits of a UUID match that element exactly; ID
matches come first. A query without a word finds
nothing.
Options:
--query <value> instead of the argument <query>
--fields <value> Search only these: `title`, `text` (the Markdown
text), `properties` (every other value, type and
status names; not relations), `id` (UUID, short ID,
identifier). Default all. repeatable
--limit <number> default: 50
--offset <number> default: 0
--input <json|@file|-> command input as JSON: inline, from a file, or from
standard input
--workspace <path> workspace root (default: nearest folder upwards with
reqseq-workspace.yaml)
--json print exactly the command output as JSON
--yaml print the whole command output as YAML, problems one
per line
-h, --help show help
Only via --input: selection

POST /v1/commands/element.search on the local API (reqseq serve api), with the input as the JSON body; the answer is the output.

Tool element_search of the MCP server (reqseq mcp), with the input as its arguments.