Compose a semantic search from its ports: resolve targets, embed the query into each, search each, fuse the rankings.
Compose a semantic search from its ports: resolve targets, embed the query into each, search each, fuse the rankings.
(context {:keys [resolver embedder searcher]})The collaborators a search runs against: an ITargetResolver, an IQueryEmbedder and an IVectorSearch.
The collaborators a search runs against: an ITargetResolver, an IQueryEmbedder and an IVectorSearch.
(search ctx {:keys [text limit] :or {limit 10} :as query})Run query against every target the resolver names.
=> {:results [entry+ …] fused, deduplicated, best first :searched [space …] spaces that answered :failed [{:space … :collection … :error …} …]}
:results are ordered by fused rank, not by distance. A target that fails is
reported in :failed; it does not shrink :results silently.
Run `query` against every target the resolver names.
=> {:results [entry+ …] fused, deduplicated, best first
:searched [space …] spaces that answered
:failed [{:space … :collection … :error …} …]}
`:results` are ordered by fused rank, not by distance. A target that fails is
reported in `:failed`; it does not shrink `:results` silently.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |