# Autodoc: new decl search system \(\#15475\) · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/b294bff1a86b58ca461a17e8f0a3b8e8082a308e)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: b294bff1a86b58ca461a17e8f0a3b8e8082a308e

Requested commit: b294bff1a86b58ca461a17e8f0a3b8e8082a308e

Commit: b294bff1a86b58ca461a17e8f0a3b8e8082a308e

Tree: 1a9683cdbf364a9cdc12b85a3f8d36850bc62aeb

Author: Loris Cro

Committer: GitHub

## Message

```
Autodoc: new decl search system (#15475)

New search system is based on a Radix Tree. The Radix Tree contains a shallow list of all decl names (ie no paths), plus some suffixes, split by following the official style guide (eg "HashMapUnmanaged" also produces "MapUnmanaged" and "Unmanaged", same with snake_case and camelCase names).

Additionally, the search system uses the decl graph data to recognize hierarchical relationships between decls, allowing you to zero on a target namespace for search. As an example "fs create" will score highe all things related to the creation of files and directories inside of `std.fs`, while still showing (but with lower score) matches from `std.Bulild`. 

As another example "fs windows" will prioritize windows-related results in `std.fs`, while "windows fs" will prioritize fs-related results in `std.windows`.


```

## Parents

- [b55b8e7745316a8e3acd4be8f2e3651d6225c710](https://git.cafe/gitcafe/zig/commit/b55b8e7745316a8e3acd4be8f2e3651d6225c710?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/b294bff1a86b58ca461a17e8f0a3b8e8082a308e?format=markdown)
