-
Notifications
You must be signed in to change notification settings - Fork 156
Support tag: query shorthand in search #535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: phernandez <paul@basicmachines.co>
|
Claude finished @phernandez's task in 3m 37s —— View job Code Review: Support tag: query shorthand in searchI've completed a thorough review of this PR against the Basic Memory team checklist. SummaryThis PR implements Files changed:
Team Checklist Results✅ Code Quality & Standards
❌ Missing: Literate programming comments The new code at
|
Signed-off-by: phernandez <paul@basicmachines.co>
|
Claude finished @phernandez's task in 2m 18s —— View job Code Review: Support tag: query shorthand in searchI've completed a thorough review of this PR against the Basic Memory team checklist. SummaryThis PR implements Files changed:
Team Checklist Results✅ Code Quality & Standards
❌ Missing: Literate programming comments The new code at
Example of what's needed: # Support tag:<tag> shorthand by mapping to tags filter
if query.text:
text = query.text.strip()
# Trigger: query starts with "tag:" prefix (case-insensitive)
# Why: provide convenient shorthand for tag filtering without verbose metadata syntax
# Outcome: transforms to tags filter, drops text search to avoid empty results
if text.lower().startswith("tag:"):
# Split on both commas and whitespace to support: tag:tier1,alpha or tag:tier1 alpha
tag_values = re.split(r"[,\s]+", text[4:].strip())
tags = [t for t in tag_values if t]
if tags:
query.tags = tags
# Outcome: text search is removed since tag prefix consumed entire query
query.text = NoneAdd literate programming comments →
|
Summary
tag:<value>query prefix to tags metadata filter so tag searches work againTesting