Add FileDef support for prerendered search #4035
Draft
jurgenwerk wants to merge 3 commits intomainfrom
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for FileDef types in the prerendered search pipeline. When a query filters on FileDef or its subclasses (like MarkdownDef), the system now correctly routes the query through the prerendered search engine with the appropriate entry type, enabling file-meta entries to be returned as prerendered cards.
Changes:
- Route file-meta queries through the prerendered search pipeline by detecting FileDef type filters
- Add
entryTypeparameter toIndexQueryEngine.searchPrerendered()to distinguish between instance and file queries - Add comprehensive test coverage for FileDef and MarkdownDef prerendered search scenarios
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/runtime-common/realm-index-query-engine.ts | Detect file-meta queries using queryTargetsFileMeta() and pass appropriate entryType to searchPrerendered() |
| packages/runtime-common/index-query-engine.ts | Add entryType parameter with default value to searchPrerendered() method |
| packages/realm-server/tests/search-prerendered-test.ts | Add comprehensive test coverage for file-meta queries including FileDef, MarkdownDef, fitted/embedded formats, and exclusion of card instances |
| packages/host/tests/integration/components/prerendered-card-search-test.gts | Add integration test for searching markdown files using FileDef type filter |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Preview deployments |
3c4390d to
04a4269
Compare
… fitted) in realm-server and allow serving them
04a4269 to
d3cdfea
Compare
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.
Route file-meta queries through the prerendered search pipeline by detecting FileDef type filters via queryTargetsFileMeta() and passing the appropriate entryType to IndexQueryEngine.searchPrerendered().