Improve top search to include authors

This commit is contained in:
aditya.chandel
2025-01-17 19:08:12 -07:00
parent 8108bf56ee
commit b8fb1d2f26
4 changed files with 32 additions and 18 deletions
@@ -139,7 +139,8 @@ export class BookService {
return this.bookState$.pipe(
map(state =>
(state.books || []).filter(book =>
book.metadata?.title?.toLowerCase().includes(query.toLowerCase())
(book.metadata?.title?.toLowerCase().includes(query.toLowerCase()) ||
book.metadata?.authors.some(author => author.name.toLowerCase().includes(query.toLowerCase())))
)
)
);