SearchStorage

Represents a specialization of the DocumentStorage interface that handles ranking documents based on their relevance to a given query. The ranking process returns documents along with a similarity score, enabling the filtering and sorting of documents by relevance.

Type Parameters

Document

The type of the documents being processed and stored.

Request

The type of search requests accepted by this storage.

Functions

Link copied to clipboard
abstract suspend fun search(request: Request, namespace: String? = null): List<SearchResult<Document>>

Searches for documents matching the given request and returns them ranked by relevance.

Link copied to clipboard

Returns the results of SearchStorage.search as a Flow instead of a list.