StringSearchService
class StringSearchService(manifest: Manifest, container: Container<Resource>, services: PublicationServicesHolder, language: String?, snippetLength: Int, searchAlgorithm: StringSearchService.Algorithm, extractorFactory: ResourceContentExtractor.Factory) : SearchService
Base implementation of SearchService iterating through the content of Publication's resources.
To stay media-type-agnostic, StringSearchService relies on ResourceContentExtractor implementations to retrieve the pure text content from markups (e.g. HTML) or binary (e.g. PDF) resources.
The actual search is implemented by the provided searchAlgorithm.
Constructors
Link copied to clipboard
constructor(manifest: Manifest, container: Container<Resource>, services: PublicationServicesHolder, language: String?, snippetLength: Int, searchAlgorithm: StringSearchService.Algorithm, extractorFactory: ResourceContentExtractor.Factory)
Types
Functions
Link copied to clipboard
open suspend override fun search(query: String, options: SearchService.Options? = null): SearchIterator
Starts a new search through the publication content, with the given query.