Add FullTextTable class attribute & FullTextIndexed property attribute for easy FTS indexing#1294
Open
risukun wants to merge 2 commits into
Open
Add FullTextTable class attribute & FullTextIndexed property attribute for easy FTS indexing#1294risukun wants to merge 2 commits into
risukun wants to merge 2 commits into
Conversation
added 2 commits
November 12, 2025 01:39
…e for easy FTS indexing
Add simple attribute support for full text indexing of a subset of columns in table as well as support to change the default tokenizer behavior [for the table. Porting a change that I did in a copy of SQLite.cs for a UWP Japanese dictionary app ~9 years ago that I'm now trying to port to MAUI. Added a bunch of unit tests to cover the functionality and confirmed the existing tests are all passing on Win11.
Example usage:
[FullTextTable]
public class Article
{
[PrimaryKey, AutoIncrement]
public int Id { get; set; }
[FullTextIndexed]
public string Title { get; set; }
[FullTextIndexed]
public string Content { get; set; }
public string Author { get; set; }
public DateTime PublishDate { get; set; }
}
[FullTextTable("JapaneseText_FT", "unicode61")]
public class JapaneseText
{
[PrimaryKey, AutoIncrement]
public int Id { get; set; }
[FullTextIndexed]
public string Text { get; set; }
public string Notes { get; set; }
}
… index when the FTS column list changes.
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.
Add FullTextTable class attribute & FullTextIndexed property attribute for easy FTS indexing
Add simple attribute support for full text indexing of a subset of columns in table as well as support to change the default tokenizer behavior [for the table. Porting a change that I did in a copy of SQLite.cs for a UWP Japanese dictionary app ~9 years ago that I'm now trying to port to MAUI. Updated to include detecting FTS column changes and rebuilding the index when the column list changes. Added a bunch of unit tests to cover the functionality and confirmed the existing tests are all passing on Win11.
Note that this PR does NOT port custom tokenizer support that I also had added in order to use a Japanese word breaker, but I can work around that with pre-breaking using a .NET Japanese language model library as long as I can at least use the "unicode61" tokenizer instead of the default "simple" one that clobbers most Unicode characters.
Example usage: