Skip to content

Conversation

@msukkari
Copy link
Contributor

Resolve repo: filters with anchored literal repository names by mapping them to actual Zoekt repo names via Prisma, fixing search issues for repos with host/port in their names.

Previously, repo: filters using a human-friendly name (e.g., zximgw/rcsiap2001) would fail if the underlying Zoekt repository name included a host or port (e.g., gerritro.zte.com.cn:29418/zximgw/rcsiap2001). This change introduces a resolver for anchored literal repo: queries (e.g., repo:"^zximgw/rcsiap2001$") that looks up matching repositories by name or displayName in the database and converts the filter to a repo_set query with the correct Zoekt name. This ensures accurate search results for such repositories.


Linear Issue: SOU-175

Open in Cursor Open in Web

This change allows the search parser to resolve exact repository names, including display names, when they are anchored with '^' and '$'. This improves search accuracy by directly mapping literal repository identifiers to their corresponding entries in the database. If the pattern is not an exact literal, it falls back to regex handling.

Co-authored-by: michael <michael@sourcebot.dev>
@cursor
Copy link

cursor bot commented Dec 29, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@coderabbitai
Copy link

coderabbitai bot commented Dec 29, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants