Skip to contents

qdrant_delete_points deletes specific vectors (points) '

Usage

qdrant_delete_points(conn, collection_name = NA_character_, ids = list())

Arguments

conn

a connection object created by get_qdrant_connection()

collection_name

the name of the collection you want to use. Defaults to NA.

ids

a list of ids to delete. Defaults to an empty list. The value of "ids" needs to be in this format: list(1,2,3) if you want to delete vectors 1,2 and 3.

Details

This will delete specific vectors based on their ids.

Examples

conn <- get_qdrant_connection()
#> → Connection to Qdrant confirmed
qdrant_create_new_collection(conn, collection_name="test_db",
vectors=list(size=3,distance="Cosine"))
#> → Collection test_db was just created on the qdrant instance.
new_vectors <- list(points=list(
list(id=1, payload=list(text="hi there"),vector=list(0.1,0.5,0.6)),
list(id=2, payload=list(text="well well well"),vector=list(0.6,0.1,0.3))
))
qdrant_upsert_points(conn, points=new_vectors,collection_name="test_db")
#> → Vectors were added in the test_db collection on the qdrant instance.
qdrant_delete_points(conn, collection_name="test_db", ids=list(1,2))
#> → Successfully deleted points.
qdrant_delete_collection(conn, "test_db")
#> → Collection test_db was just deleted on the qdrant instance.