mirror of
https://github.com/standardebooks/web.git
synced 2025-07-15 02:46:46 -04:00
When searching ebooks by keyword, also search collection names
This commit is contained in:
parent
f42fc7468e
commit
95ee5265bc
1 changed files with 5 additions and 1 deletions
|
@ -422,12 +422,16 @@ class Ebook{
|
|||
}
|
||||
|
||||
public function Contains(string $query): bool{
|
||||
// When searching an ebook, we search the title, alternate title, author(s), SE tags, and LoC tags.
|
||||
// When searching an ebook, we search the title, alternate title, author(s), SE tags, series data, and LoC tags.
|
||||
|
||||
$searchString = $this->FullTitle ?? $this->Title;
|
||||
|
||||
$searchString .= ' ' . $this->AlternateTitle;
|
||||
|
||||
foreach($this->Collections as $collection){
|
||||
$searchString .= ' ' . $collection->Name;
|
||||
}
|
||||
|
||||
foreach($this->Authors as $author){
|
||||
$searchString .= ' ' . $author->Name;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue