feat(subsonic): allow search with MBID (#579)
* feat(search): use search2/3 query to additionally search track MBID * feat(search): use strict equality for MBID search don't compare substrings for now to reduce unwanted results based on MBIDs might also make search more efficient * feat(db): add migration to create index on MBID for MBID search * tweak(search): remove unnecessary trim on query
This commit is contained in:
No files matched your search
@@ -77,6 +77,7 @@ func (db *DB) Migrate(ctx MigrationContext) error {
|
||||
construct(ctx, "202501152036", migrateAlbumAddIndexOnParentID),
|
||||
construct(ctx, "202502012036", migratePodcastEpisode),
|
||||
construct(ctx, "202504132036", migratePodcast),
|
||||
construct(ctx, "202505211202", migrateTrackAddIndexOnBrainzID),
|
||||
}
|
||||
|
||||
return gormigrate.
|
||||
@@ -840,3 +841,9 @@ func migratePodcastEpisode(tx *gorm.DB, _ MigrationContext) error {
|
||||
PodcastEpisode{},
|
||||
).Error
|
||||
}
|
||||
|
||||
func migrateTrackAddIndexOnBrainzID(tx *gorm.DB, _ MigrationContext) error {
|
||||
return tx.Exec(`
|
||||
CREATE INDEX idx_tracks_brainz_id ON "tracks" (tag_brainz_id);
|
||||
`).Error
|
||||
}
|
||||
Reference in New Issue
Block a user