Debian Code Search FAQ
Q: What kind of keywords can I use in the search field?
Each keyword must be specified as "type:value", without additional spaces.
Keywords are separated from search terms by space, e.g. "printf filetype:c".
All keywords can be negated, e.g. “xcb_create_window -filetype:c”.
Filters file names according to their extension.
To find source code dealing with XMPP written in Perl, you could search for "XMPP filetype:perl".
- package (or pkg)
Searches only within the specified Debian source package.
To find all calls to xcb_create_window which the window manager i3 does, you could search for "xcb_create_window package:i3-wm".
Searches only files that match the given path (using regular expressions).
To find only matches within Debian packaging, use e.g. "systemctl path:debian/".
To find only matches within the libi3 folder of any version of i3-wm, use "i3Font path:i3-wm_.*/libi3/".
Q: Can I use regular expressions?
Why yes! The full syntax is described at RE2:Syntax. Be sure to switch the search mode from “literal” to “regex”.
Q: Where is the source code of DCS?
You can find the source at github.com/Debian/dcs
Q: Which Debian distributions are indexed (e.g. testing, sid, experimental)?
Currently, DCS indexes sid only. If you have good arguments for extending or changing this, please let us know. Consider that including multiple versions of the source will lead to more search results from “the same” code.
Q: How long does it take until new code is indexed?
Once a source package is uploaded to ftp-master, we fetch it and start the indexing process typically within a couple of minutes (in the worst case, it will take up to an hour until we see the package). Then, it typically takes another couple of minutes until the index was rebuilt and is live. All in all, expect to see new source code being searchable about an hour or two after it was uploaded.
I want to use the code search service in my own project, is there an official API?
Yes! See Debian Code Search API keys.
We have a list of third party projects, which use Debian Code Search.