Skip to content

Commit

Permalink
Fix search; don't filter books
Browse files Browse the repository at this point in the history
When search was written, somehow the document type was set to book
and now it is not. So search wasn't searching any books.
  • Loading branch information
chrisvire committed Nov 7, 2024
1 parent 7f19c16 commit 75ec7bf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/search-worker/data/pk-verse-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ export class ProskommaVerseProvider implements QueryVerseProvider {
async setBooks() {
this.nextBook = 0;
const queryData = await this.pk.queryBooks(this.searchPhrase, this.options);
this.books = queryData.filter((bk) => bk.idParts.type === 'book');
// Note: We might need to filter if Proskomma includes other type of documents.
// Currently, type = null for scripture books
// this.books = queryData.filter((bk) => bk.idParts.type === 'book');
this.books = queryData;
}

async versesOfBook(book: GQLBookId): Promise<SearchCandidate[]> {
Expand Down

0 comments on commit 75ec7bf

Please sign in to comment.