search index fixes (#559)

* add music video artist to search index

* properly index minutes field when adding from scan

* bump search index version
This commit is contained in:
Jason Dove
2022-01-06 10:28:53 -06:00
committed by GitHub
parent 8036e46966
commit d9d2cfa8be
9 changed files with 60 additions and 8 deletions
@@ -79,7 +79,7 @@ namespace ErsatzTV.Infrastructure.Search
_initialized = false;
}
public int Version => 18;
public int Version => 19;
public Task<bool> Initialize(ILocalFileSystem localFileSystem)
{
@@ -675,6 +675,14 @@ namespace ErsatzTV.Infrastructure.Search
{
doc.Add(new TextField(StudioField, studio.Name, Field.Store.NO));
}
if (musicVideo.Artist != null)
{
foreach (ArtistMetadata artistMetadata in musicVideo.Artist.ArtistMetadata)
{
doc.Add(new TextField(ArtistField, artistMetadata.Title, Field.Store.NO));
}
}
_writer.UpdateDocument(new Term(IdField, musicVideo.Id.ToString()), doc);
}