Qdrant.Api.Http.Indexes (Qdrant v0.1.18)

Copy Markdown View Source

Qdrant API Field Indexes operations.

Field indexes allow to speed up filtering and sorting operations on payload fields.

Summary

Functions

create_field_index(collection_name, body)

@spec create_field_index(String.t(), Qdrant.Types.request_body()) ::
  Qdrant.Types.result(map())

create_field_index(client, collection_name, body)

@spec create_field_index(Qdrant.Client.t(), String.t(), Qdrant.Types.request_body()) ::
  Qdrant.Types.result(map())
@spec create_field_index(String.t(), Qdrant.Types.request_body(), boolean() | nil) ::
  Qdrant.Types.result(map())

create_field_index(client, collection_name, body, opts)

Create index for field in collection.

Parameters

  • collection_name required - Name of the collection
  • body required - Field index configuration
  • opts - Options, including :wait, :ordering, and :timeout

Network example (not a doctest)

client = Qdrant.Client.new!()
body = %{field_name: "category", field_schema: "keyword"}
Qdrant.Api.Http.Indexes.create_field_index(client, "my_collection", body)
{:ok, %{"result" => %{...}, "status" => "ok"}}

create_field_index(collection_name, body, wait, ordering, timeout)

@spec create_field_index(
  String.t(),
  Qdrant.Types.request_body(),
  boolean() | nil,
  Qdrant.Types.ordering() | nil,
  integer() | nil
) :: Qdrant.Types.result(map())

delete_field_index(collection_name, field_name)

@spec delete_field_index(String.t(), String.t()) :: Qdrant.Types.result(map())

delete_field_index(client, collection_name, field_name)

@spec delete_field_index(Qdrant.Client.t(), String.t(), String.t()) ::
  Qdrant.Types.result(map())
@spec delete_field_index(String.t(), String.t(), boolean() | nil) ::
  Qdrant.Types.result(map())

delete_field_index(client, collection_name, field_name, opts)

@spec delete_field_index(
  Qdrant.Client.t(),
  String.t(),
  String.t(),
  Qdrant.Types.request_options()
) ::
  Qdrant.Types.result(map())
@spec delete_field_index(
  String.t(),
  String.t(),
  boolean() | nil,
  Qdrant.Types.ordering() | nil
) :: Qdrant.Types.result(map())

Delete index for field in collection.

Parameters

  • collection_name required - Name of the collection
  • field_name required - Name of the field to delete index for
  • opts - Options, including :wait, :ordering, and :timeout

Network example (not a doctest)

client = Qdrant.Client.new!()
Qdrant.Api.Http.Indexes.delete_field_index(client, "my_collection", "category")
{:ok, %{"result" => %{...}, "status" => "ok"}}

delete_field_index(collection_name, field_name, wait, ordering, timeout)

@spec delete_field_index(
  String.t(),
  String.t(),
  boolean() | nil,
  Qdrant.Types.ordering() | nil,
  integer() | nil
) :: Qdrant.Types.result(map())