Merge branch 'rmcrackan:master' into master
This commit is contained in:
commit
b028899949
@ -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
|
* Full official guide: https://lucene.apache.org/core/2_9_4/queryparsersyntax.html
|
||||||
* Tons of search fields, specific to audiobooks
|
* 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
|
* 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 
|
* Click [?] button for a full list of search fields and synonyms 
|
||||||
* Search by tag like \[this\]
|
* 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.
|
* 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.
|
||||||
|
|
||||||
|
|||||||
@ -36,6 +36,7 @@ namespace LibationSearchEngine
|
|||||||
public const string ALL_TITLE = nameof(Book.Title);
|
public const string ALL_TITLE = nameof(Book.Title);
|
||||||
public const string ALL_AUTHOR_NAMES = "AuthorNames";
|
public const string ALL_AUTHOR_NAMES = "AuthorNames";
|
||||||
public const string ALL_NARRATOR_NAMES = "NarratorNames";
|
public const string ALL_NARRATOR_NAMES = "NarratorNames";
|
||||||
|
public const string ALL_SERIES_NAMES = "SeriesNames";
|
||||||
|
|
||||||
private static ReadOnlyDictionary<string, Func<LibraryBook, string>> idIndexRules { get; }
|
private static ReadOnlyDictionary<string, Func<LibraryBook, string>> idIndexRules { get; }
|
||||||
= new ReadOnlyDictionary<string, Func<LibraryBook, string>>(
|
= new ReadOnlyDictionary<string, Func<LibraryBook, string>>(
|
||||||
@ -64,16 +65,8 @@ namespace LibationSearchEngine
|
|||||||
["Narrators"] = lb => lb.Book.NarratorNames(),
|
["Narrators"] = lb => lb.Book.NarratorNames(),
|
||||||
[nameof(Book.Publisher)] = lb => lb.Book.Publisher,
|
[nameof(Book.Publisher)] = lb => lb.Book.Publisher,
|
||||||
|
|
||||||
["SeriesNames"] = lb => string.Join(
|
[ALL_SERIES_NAMES] = lb => lb.Book.SeriesNames(),
|
||||||
", ",
|
["Series"] = lb => lb.Book.SeriesNames(),
|
||||||
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)),
|
|
||||||
["SeriesId"] = lb => string.Join(", ", lb.Book.SeriesLink.Select(s => s.Series.AudibleSeriesId)),
|
["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()),
|
["CategoriesNames"] = lb => lb.Book.CategoriesIds() is null ? null : string.Join(", ", lb.Book.CategoriesIds()),
|
||||||
@ -160,7 +153,8 @@ namespace LibationSearchEngine
|
|||||||
idIndexRules[ALL_AUDIBLE_PRODUCT_ID],
|
idIndexRules[ALL_AUDIBLE_PRODUCT_ID],
|
||||||
stringIndexRules[ALL_TITLE],
|
stringIndexRules[ALL_TITLE],
|
||||||
stringIndexRules[ALL_AUTHOR_NAMES],
|
stringIndexRules[ALL_AUTHOR_NAMES],
|
||||||
stringIndexRules[ALL_NARRATOR_NAMES]
|
stringIndexRules[ALL_NARRATOR_NAMES],
|
||||||
|
stringIndexRules[ALL_SERIES_NAMES]
|
||||||
};
|
};
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user