feat(search): add natural-language query support to dirctl search and SearchService#1770
Merged
Conversation
Contributor
|
The latest Buf updates on your PR. Results from workflow Buf CI / verify-proto (pull_request).
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
…E_TEXT Signed-off-by: Catarina Paralta <clouropa@cisco.com>
Signed-off-by: Catarina Paralta <clouropa@cisco.com>
Signed-off-by: Catarina Paralta <clouropa@cisco.com>
Signed-off-by: Catarina Paralta <clouropa@cisco.com>
This was
linked to
issues
Jul 9, 2026
Signed-off-by: Catarina Paralta <clouropa@cisco.com>
ramizpolic
approved these changes
Jul 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(search): add natural-language search to dirctl
Adds
dirctl search "<free-text query>"as a new search mode backed by the OASF extractor provisioned bydirctl init. The extractor runs locally and decomposes the query into skill, domain, and keyword signals; each signal is fanned out as a parallelSearchCIDscall and results are ranked client-side by how many signals matched each record. This requires no server-side ranking changes — scoring happens entirely in the CLI, so the only server additions are a newRECORD_QUERY_TYPE_DESCRIPTIONquery type (wildcard-matching the record description field) andSORT_MODE_RELEVANCEin the proto (which maps to recency on the server, since fan-out queries don't need a specific server-side order).--verboseprints signal decomposition and per-signal CID counts to stderr, which is useful for understanding why specific records appear in results.--sortis also added to the structured search path for completeness (recency, popularity, relevance).Signal decomposition is intentionally implemented client-side (in the CLI) rather than in the server. The OASF extractor is a local sentence-transformer model (~89 MB) provisioned per-user by
dirctl init; embedding it in the server would add a large runtime dependency and make horizontal scaling significantly harder. The trade-off is that the gateway (AI Catalog) cannot offer NL search today — any gateway endpoint that wants to expose free-text queries would need either a server-side extractor service that accepts a raw query string and performs decomposition server-side.Example output