search

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

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

Return

A list of search results, each containing a document and its score.

Parameters

request

The search request containing the query, result limit, and other search parameters.

namespace

An optional namespace to scope the search. If null, the default namespace is used.