search

suspend fun search(query: String, verseIDs: List<VerseID>?, limit: Long = Long.MAX_VALUE, offset: Long = Long.MIN_VALUE): List<Verse>

Performs a text search across Bible verses with optional verse ID filtering. The search can be customized using different search types and supports pagination. If verseIDs is provided, the search will be limited to only those verses.

Return

List of Verse objects matching the search criteria

Parameters

query

The text to search for within verses

verseIDs

Optional list of specific verse IDs to search within, if null searches all verses

limit

Maximum number of results to return (default: Long.MAX_VALUE)

offset

Number of results to skip for pagination (default: Long.MIN_VALUE)

Throws

if there's an error accessing the database


suspend fun search(query: String, reference: Reference, limit: Long = Long.MAX_VALUE, offset: Long = Long.MIN_VALUE): List<Verse>

Performs a text search within a specific range of verses defined by start and end verse IDs. This is a more direct way to search within a specific range compared to using Reference.

Return

List of Verse objects matching the search criteria within the specified range

Parameters

query

The text to search for within verses

reference

The Reference defining the range to search within

limit

Maximum number of results to return (default: Long.MAX_VALUE)

offset

Number of results to skip for pagination (default: Long.MIN_VALUE)

Throws

if there's an error accessing the database