Skeg.Server.Capabilities (skeg v1.0.0)

Copy Markdown

What the server advertises. Limits can change between releases: read them from the server rather than hard-coding them.

  • kinds - index kinds the server accepts, in its order; a kind this client does not know stays a string
  • default_kind - the kind of a create that names none
  • features - optional features of this build, such as "vsearch.filter"
  • limits - max_dim (widest vector), max_k (a larger k is reduced to it), max_l (a larger search list is refused by create, reduced by search)
  • read_only - the server refuses every write
  • raw - the reply as received, fields this client does not read included

Summary

Types

t()

@type t() :: %Skeg.Server.Capabilities{
  auth_required: boolean(),
  auth_supported: boolean(),
  default_kind: Skeg.Vector.kind() | String.t(),
  features: [String.t()],
  kinds: [Skeg.Vector.kind() | String.t()],
  limits: %{max_dim: pos_integer(), max_k: pos_integer(), max_l: pos_integer()},
  raw: Skeg.RESP.value(),
  read_only: boolean(),
  version: String.t()
}