action codesearch_searchperpackage { label: "Like /search, but aggregates per package" description: "The search results are currently sorted arbitrarily, but we intend to sort them by ranking eventually: https://github.com/Debian/dcs/blob/51338e934eb7ee18d00c5c18531c0790a83cb698/cmd/dcs-web/querymanager.go#L719" provider: codesearch method: GET path: "/searchperpackage" encoding: json input: { type: "object" properties: { match_mode: { type: "string" enum: ["literal", "regexp"] } query: { type: "string" } } required: ["query"] additionalProperties: false } output: { type: "array" items: { type: "object" required: ["package", "results"] properties: { package: { type: "string" description: "The Debian source package for which up to 2 search results have been aggregated in `results`." } results: { type: "array" items: { type: "object" description: "A search result matching the specified query. You can use sources.debian.org to view the file contents. See https://github.com/Debian/dcs/blob/master/cmd/dcs-web/show/show.go for how to construct a sources.debian.org URL from a search result." required: ["context", "line", "package", "path"] properties: { context: { type: "string" description: "The full line containing the search result." } context_after: { type: "array" description: "Up to 2 full lines after the search result (see `context`)." items: { type: "string" } } context_before: { type: "array" description: "Up to 2 full lines before the search result (see `context`)." items: { type: "string" } } line: { type: "integer" format: "uint32" description: "Line number containing the search result." } package: { type: "string" description: "The Debian source package containing this search result, including the full Debian version number." } path: { type: "string" description: "Path to the file containing the this search result, starting with `package`." } } } } } } } }