mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-04 18:09:12 +03:00
[PR #15455] Add FTS5 full-text search support for BaseItems #14314
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/15455
Author: @TOomaAh
Created: 11/10/2025
Status: 🔄 Open
Base:
master← Head:feature/full-text-search📝 Commits (7)
87a7796Add FTS5 full-text search support for BaseItems8ae6c95feat: agnostic databaseee9eccdrefactor: remove take500442frefactor: use Join522aaa3reorder column + replace JOIN by IN1370ce3fix commentsbb14f67refactor: isolate provider-specific entities from base DbContext📊 Changes
19 files changed (+4183 additions, -1736 deletions)
View changed files
📝
Jellyfin.Server.Implementations/Extensions/ServiceCollectionExtensions.cs(+13 -2)📝
Jellyfin.Server.Implementations/Item/BaseItemRepository.cs(+19 -7)📝
Jellyfin.Server/Program.cs(+3 -0)➕
src/Jellyfin.Database/Jellyfin.Database.Implementations/Extensions/FullTextSearchExtensions.cs(+166 -0)➕
src/Jellyfin.Database/Jellyfin.Database.Implementations/FtsSearchOptions.cs(+30 -0)➕
src/Jellyfin.Database/Jellyfin.Database.Implementations/IFullTextSearchProvider.cs(+26 -0)📝
src/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs(+27 -0)📝
src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDbContext.cs(+8 -3)➕
src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Entities/BaseItemFtsEntity.cs(+46 -0)➕
src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Extensions/Fts5QueryBuilder.cs(+71 -0)➕
src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Extensions/SqliteFtsDbFunctions.cs(+13 -0)➕
src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20251108202033_AddFullTextSearchIndexes.Designer.cs(+1721 -0)➕
src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20251108202033_AddFullTextSearchIndexes.cs(+76 -0)📝
src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/JellyfinDbModelSnapshot.cs(+1757 -1718)📝
src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs(+5 -5)➕
src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/ModelConfiguration/BaseItemFtsEntityConfiguration.cs(+30 -0)📝
src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/SqliteDatabaseProvider.cs(+47 -1)➕
src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/SqliteFtsProvider.cs(+88 -0)➕
src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/SqliteJellyfinDbContext.cs(+37 -0)📄 Description
Changes
Implements SQLite FTS5 virtual table to improve search performance on large media libraries. Uses pure LINQ queries via BaseItemFtsEntity with the Match column approach. Includes migration with automatic sync triggers for INSERT/UPDATE/DELETE operations. Configures Porter stemming tokenizer with prefix matching for more flexible search results.
Current implementation:
With FTS5:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.