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
Ranks documents in the storage based on their relevance to the given query. Each document is assigned a similarity score that represents how closely it matches the query.
Link copied to clipboard
fun <Document, Request : SearchRequest> SearchStorage<Document, Request>.searchAsFlow(request: Request, namespace: String? = null): Flow<SearchResult<Document>>
Returns the results of SearchStorage.search as a Flow instead of a list.