feat: emit Lucene filters for KV items direct_read optimization#2301
feat: emit Lucene filters for KV items direct_read optimization#2301knudtty wants to merge 8 commits into
Conversation
Sidebar and dashboard filters now emit Lucene conditions instead of raw SQL, enabling the KV items direct_read optimization on Map columns (e.g. LogAttributes, ResourceAttributes). This routes filter equality checks through the Lucene serializer's eq() path which rewrites to has(KvItemsColumn, concat(key, sep, value)) when a text(tokenizer=array) index exists. - filtersToQuery emits type:'lucene' for all filters (range stays SQL) - parseLuceneFilter uses the existing Lucene parser + decodeSpecialTokens - Removed stringifyKeys option (Lucene serializer handles JSON toString) - Added AGENTS.md guidance on reusing existing utility functions
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🟡 Tier 3 — StandardIntroduces new logic, modifies core functionality, or touches areas with non-trivial risk. Why this tier:
Review process: Full human review — logic, architecture, edge cases. Stats
|
PR ReviewSolid refactor — filter emission is consolidated through
|
Deep Review🔴 P0/P1 -- must fix
🟡 P2 -- recommended
🔵 P3 nitpicks (8)
Reviewers (6): correctness, maintainability, testing, api-contract, project-standards, kieran-typescript. Testing gaps:
|
E2E Test Results✅ All tests passed • 178 passed • 3 skipped • 1179s
Tests ran across 4 shards in parallel. |
🦋 Changeset detectedLatest commit: d1ee2ad The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Summary
Sidebar and dashboard filters now emit Lucene conditions instead of raw SQL, enabling the KV items direct_read optimization on Map columns (e.g. LogAttributes, ResourceAttributes). This routes filter equality checks through the Lucene serializer's eq() path which rewrites to has(KvItemsColumn, concat(key, sep, value)) when a text(tokenizer=array) index exists.
Steps:
has(ResourceAttributeItems, concat('key', '=', 'value')References