Last active
November 21, 2021 18:21
-
-
Save blaugold/a5a10872a1799e281005b2e7419d8d52 to your computer and use it in GitHub Desktop.
This file contains 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
Future<void> createNoteFtsIndex() async { | |
// Existing documents will be indexed when an index is created. | |
await database.createIndex( | |
// Any existing index, with the same name, will be replaced with | |
// a new index, with the new configuration. | |
'note-fts', | |
FullTextIndexConfiguration( | |
// We want both the title and body of the note to be indexed. | |
['title', 'body'], | |
// By selecting the language, that is primarily used in the | |
// indexed fields, users will get better search results. | |
language: FullTextLanguage.english, | |
), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment