[POS FTS] 1: Add FTS schema, model, and feature flag#16594
Merged
Conversation
Add the foundation for FTS-based search in Point of Sale: - V002FTSSearch migration creating pos_search_fts FTS5 virtual table with UNINDEXED metadata columns (siteID, itemType, itemID, parentProductID) - POSSearchIndex model for decoding FTS search results - GRDBManager: register migration, handle FTS5 shadow tables in reset - pointOfSaleFTSSearch feature flag (alpha + local dev) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 task
Collaborator
Collaborator
|
|
1 task
staskus
approved these changes
Feb 5, 2026
Contributor
staskus
left a comment
There was a problem hiding this comment.
The start looks good. The pos_search_fts table gets created. I did some reading around FTS + GRDB to make sure I understand if it's built correctly.
Left an optional comment.
| } | ||
|
|
||
| private static func createSearchFTSTable(_ db: Database) throws { | ||
| try db.execute(sql: """ |
Contributor
There was a problem hiding this comment.
As I understand, GRDB also allows to define the same virtual table creation in Swift-API.
try db.create(virtualTable: "pos_search_fts", using: FTS5()) { t in
t.column("searchable_text")
t.column("siteID").notIndexed()
t.column("itemType").notIndexed()
t.column("itemID").notIndexed()
t.column("parentProductID").notIndexed()
}
Collaborator
🤖 Build Failure AnalysisThis build has failures. Claude has analyzed them - check the build annotations for details. |
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.

Part of: WOOMOB-2109
Merge after #16592
Description
Full Text Search requires a virtual table to make the reverse index for the search lookups. This PR adds that table and a model for us to fetch results into.
This is our first migration after adding FTS – it's worth installing from trunk, doing a full sync, and then updating to this PR (or a later one) over the top to trigger that migration.
The FTS5 table uses
UNINDEXEDcolumns for siteID, itemType, itemID, and parentProductID. These are stored and queryable but will not form part of FTS searches, they're just so we can find the correct underlying model. Onlysearchable_textparticipates in FTS matching.Test Steps
pos_search_ftstableRELEASE-NOTES.txtif necessary.