Skip to content

feat(query): full-text search over string annotations - #244

Merged
ionos-landgraf-vin merged 1 commit into
mainfrom
feat/query-text-search
Nov 6, 2026
Merged

ionos-landgraf-vin merged 1 commit into
mainfrom
feat/query-text-search

Conversation

@ionos-landgraf-vin

Copy link
Copy Markdown
Collaborator

Summary

  • New query condition text: text =~ "x", text: "x", text =~ /re/i check every string annotation (descriptions, titles, link/*, page content, ...), case-insensitive regex like name =~.
  • text(architecture/description) =~ "x" and text(link/*, page/content) =~ "x" restrict the keys; * is any run of characters, as in annotation patterns.
  • Combines with kind prefix, annotation filters, relations and !/&/|. The bare word text stays a name search; * is now allowed inside identifiers (it was a lexer error before).
  • MCP query: each hit of a text query carries matched_text ([{key, snippet}], up to 3, snippet around the match); unknown keys in text(...) give the usual warning. Tool description and docs/search.md document it.
  • Not included: indexing YAML comments (the issue lists it as optional; it needs the loader to keep comments).

Closes #236

Test plan

  • Parser tests (all forms, keys, regex, combination, bare text, errors)
  • Evaluator tests (keys, wildcard, case, regex literal, negation, kind)
  • MCP test for matched_text with snippet and the key warning
  • Full suite: 2673 runs, 0 failures; rubocop and steep clean

🤖 Generated with Claude Code

text =~ "x" / text: "x" search every string annotation (descriptions,
titles, link/*, page content), text(key, link/*) =~ "x" restricts the
keys. Case-insensitive regex like name =~, combinable with kinds,
annotation filters and relations. The MCP query tool shows matched_text
(annotation key and a snippet) per hit and warns about unknown keys.

Closes #236

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@ionos-landgraf-vin
ionos-landgraf-vin merged commit 0a38b0a into main Nov 6, 2026
8 checks passed
@ionos-landgraf-vin
ionos-landgraf-vin deleted the feat/query-text-search branch November 6, 2026 09:16
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.

MCP: Add full-text search over descriptions, links and comments to the query language

1 participant