View Source Qdrant (Qdrant v0.0.8)

Documentation for Qdrant.

Link to this section Summary

Functions

Returns information about a collection with the given name.

Creates a collection with the given name and body. Body must be a map with the key vectors, example

Deletes a collection with the given name.

Retrieve full information of single point by id.

Retrieve multiple points by specified IDs

Returns a list of all collections.

Search for points in the given collection. Retrieve closest points based on vector similarity and given filtering conditions.

Perform insert + updates on points. If point with given ID already exists - it will be overwritten.

Link to this section Functions

Link to this function

collection_info(collection_name)

View Source

Returns information about a collection with the given name.

Link to this function

create_collection(collection_name, body, timeout \\ nil)

View Source

Creates a collection with the given name and body. Body must be a map with the key vectors, example:

%{
  vectors: %{
    size: 42,
    distance: "Cosine"
  }
}

For full documentation check: Qdrant Create Collection

Link to this function

delete_collection(collection_name, timeout \\ nil)

View Source

Deletes a collection with the given name.

Link to this function

get_point(collection_name, point_id, consistency \\ nil)

View Source

Retrieve full information of single point by id.

Example:

Qdrant.get_point("collection_name", 1)
Link to this function

get_points(collection_name, points_body, consistency \\ nil)

View Source

Retrieve multiple points by specified IDs

Example:

body = %{
  ids: [1, 2, 3],
  with_payload: true
}
Qdrant.get_points("collection_name", body)

Returns a list of all collections.

Link to this function

search_points(collection_name, body, consistency \\ nil)

View Source

Search for points in the given collection. Retrieve closest points based on vector similarity and given filtering conditions.

Parameters:

  • collection_name - name of the collection to search in
  • body - search body
  • consistency - Define read consistency guarantees for the operation

Body must be a map with the key limit and vector, example:

%{
  vector: vector,
  limit: 3,
  with_payload: true
}

Example:

body = %{
  vector: vector,
  limit: 3,
  with_payload: true
}
Qdrant.search_points("collection_name", body)
Link to this function

upsert_point(collection_name, body, wait \\ false, ordering \\ nil)

View Source

Perform insert + updates on points. If point with given ID already exists - it will be overwritten.

Body must be a map with the key points or batch, example:

%{
  points: [
    %{
      id: 1,
      vector: vector1
    },
    %{
      id: 2,
      vector: vector2
    }
  ]
}

Or batch:

%{
  batch: %{
    ids: [1, 2],
    vectors: [vector1, vector2]
  }
}

For full documentation check: Qdrant Upsert Points