diff --git a/Documentation/SearchingAndFiltering.md b/Documentation/SearchingAndFiltering.md index eb3c7e2c..a9c0a30c 100644 --- a/Documentation/SearchingAndFiltering.md +++ b/Documentation/SearchingAndFiltering.md @@ -40,7 +40,7 @@ Libation's advanced searching is built on the powerful Lucene search engine. Sim * Full official guide: https://lucene.apache.org/core/2_9_4/queryparsersyntax.html * Tons of search fields, specific to audiobooks * Synonyms so you don't have to memorize magic words. Eg: author and author**s** will both work -* Click [?] button for a full list of search fields and synonyms ![Filter options](images/FilterOptions.png) +* Click [?] button for a full list of search fields and synonyms ![Filter options](images/FilterOptionsButton.png) * Search by tag like \[this\] * When tags have an underscore you can use part of the tag. This is useful for quick categories. The below examples make this more clear. diff --git a/Source/LibationSearchEngine/SearchEngine.cs b/Source/LibationSearchEngine/SearchEngine.cs index f10ea71c..6b373e75 100644 --- a/Source/LibationSearchEngine/SearchEngine.cs +++ b/Source/LibationSearchEngine/SearchEngine.cs @@ -36,6 +36,7 @@ namespace LibationSearchEngine public const string ALL_TITLE = nameof(Book.Title); public const string ALL_AUTHOR_NAMES = "AuthorNames"; public const string ALL_NARRATOR_NAMES = "NarratorNames"; + public const string ALL_SERIES_NAMES = "SeriesNames"; private static ReadOnlyDictionary> idIndexRules { get; } = new ReadOnlyDictionary>( @@ -64,16 +65,8 @@ namespace LibationSearchEngine ["Narrators"] = lb => lb.Book.NarratorNames(), [nameof(Book.Publisher)] = lb => lb.Book.Publisher, - ["SeriesNames"] = lb => string.Join( - ", ", - lb.Book.SeriesLink - .Where(s => !string.IsNullOrWhiteSpace(s.Series.Name)) - .Select(s => s.Series.AudibleSeriesId)), - ["Series"] = lb => string.Join( - ", ", - lb.Book.SeriesLink - .Where(s => !string.IsNullOrWhiteSpace(s.Series.Name)) - .Select(s => s.Series.AudibleSeriesId)), + [ALL_SERIES_NAMES] = lb => lb.Book.SeriesNames(), + ["Series"] = lb => lb.Book.SeriesNames(), ["SeriesId"] = lb => string.Join(", ", lb.Book.SeriesLink.Select(s => s.Series.AudibleSeriesId)), ["CategoriesNames"] = lb => lb.Book.CategoriesIds() is null ? null : string.Join(", ", lb.Book.CategoriesIds()), @@ -160,7 +153,8 @@ namespace LibationSearchEngine idIndexRules[ALL_AUDIBLE_PRODUCT_ID], stringIndexRules[ALL_TITLE], stringIndexRules[ALL_AUTHOR_NAMES], - stringIndexRules[ALL_NARRATOR_NAMES] + stringIndexRules[ALL_NARRATOR_NAMES], + stringIndexRules[ALL_SERIES_NAMES] }; #endregion