> ## Documentation Index
> Fetch the complete documentation index at: https://docs.duckbrain.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# search

> Ranked search with facet filters and snippets

```bash theme={null}
duckbrain search "<query>" [--mode bm25|vec|hybrid] [--k 8] [facets]
```

Returns score, path, title, and a snippet per hit. Facets filter **before** ranking:

```bash theme={null}
duckbrain search "payroll" --source slack:autono --in admin-cindy --since 30d
duckbrain search "getting new hires set up" --mode hybrid --source slack
```

`--mode bm25` (default) is keyword relevance; `vec` is local-embedding similarity; `hybrid` fuses both with reciprocal-rank fusion. See **Search & Facets** for the full facet contract (`--source app:account`, `--in`, `--since/--until/--on`, `--where`).


## Related topics

- [Search & Facets](/search.md)
- [index](/commands/index.md)
- [For Agents](/agents.md)
- [DuckBrain](/index.md)
- [context](/commands/context.md)
