Browse documentation

Search guide

Scout search modes

Choose a search mode from the question. Exact scans and ranked discovery answer different questions.

Choose a search mode

Strict lexical search

Use it for exact, exhaustive lookup.

  • literal finds an exact text sequence.
  • regex finds text that matches a regular expression.
  • word finds whole words and excludes substring-only matches.
  • Strict results report whether the scan was exhaustive. Partial scans report their limit and coverage.
{ "query": "deprecated_api", "target": "content", "match": "word" }

Fuzzy ranked search

Use it for approximate file, path, or identifier discovery.

  • Fuzzy search ranks a bounded result set. It is not an exhaustive audit.
  • It fits incomplete spellings, remembered fragments, and exploratory navigation.
{ "query": "usrctrl", "target": "files", "match": "fuzzy" }

Semantic search

Use it for concept discovery when the query and code use different words.

  • Semantic queries find related code concepts. The optional tier uses a local model.
  • If the tier is unavailable, degraded reports a lexical fallback.
{ "query": "where request retries are limited", "target": "semantic" }

Hybrid retrieval

Use it when concept similarity and shared vocabulary both matter.

  • Semantic queries fuse embedding search with a lexical ranking over the same chunks.
  • route.tier reports hybrid when both rankings contribute.
  • The returned score orders that result set. It is not a similarity percentage.

Structural search

Use it for syntax-aware matching by code shape.

  • target: structural runs ast-grep patterns with $NAME and $$$ captures.
  • target: symbols returns a declaration outline with names, kinds, and containers.
  • Native syntax support depends on a linked grammar. Scout reports degradation for uncovered languages.
{ "query": "console.log($$$)", "target": "structural", "scope": { "languages": ["javascript"] } }

Resident index and freshness

Use the same search surface across repeated agent steps.

  • Scout keeps a resident workspace index and updates it from filesystem events.
  • Each query applies pending watcher changes before it reads the index.
  • server_status reports index revision, file count, tier state, and watcher state.

Scope and related tools

  • Scope searches with path prefixes, globs, or language filters. Check complete, reason, coverage, and degraded before accepting an empty result.
  • Semantic search is optional. Read its requirements and setup.
  • Use Glider or TGlider for compiler-backed references and refactors.
  • See benchmarks for measured latency, setup costs, conditions, and unmeasured areas.