From ecd3a5b0f17295bbfe06ad56f57433da22e122ce Mon Sep 17 00:00:00 2001 From: Toni Date: Wed, 21 Feb 2024 19:25:22 +0100 Subject: [PATCH] Fix upload_records deprecation for upload_points (#622) * Fix upload_records deprecation for upload_points * Change models.Record for models.PointStruct * Added warning for qdrant-client version 1.7.1 or higher requirement * Better styling without bullet point --- .../documentation/tutorials/search-beginners.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/qdrant-landing/content/documentation/tutorials/search-beginners.md b/qdrant-landing/content/documentation/tutorials/search-beginners.md index 8c10f7e52..ffd768cc4 100644 --- a/qdrant-landing/content/documentation/tutorials/search-beginners.md +++ b/qdrant-landing/content/documentation/tutorials/search-beginners.md @@ -33,9 +33,13 @@ pip install -U sentence-transformers Once encoded, this data needs to be kept somewhere. Qdrant lets you store data as embeddings. You can also use Qdrant to run search queries against this data. This means that you can ask the engine to give you relevant answers that go way beyond keyword matching. ```bash -pip install qdrant-client +pip install -U qdrant-client ``` + + ### Import the models Once the two main frameworks are defined, you need to specify the exact models this engine will use. Before you do, activate the Python prompt (`>>>`) with the `python` command. @@ -172,10 +176,10 @@ qdrant.recreate_collection( Tell the database to upload `documents` to the `my_books` collection. This will give each record an id and a payload. The payload is just the metadata from the dataset. ```python -qdrant.upload_records( +qdrant.upload_points( collection_name="my_books", - records=[ - models.Record( + points=[ + models.PointStruct( id=idx, vector=encoder.encode(doc["description"]).tolist(), payload=doc ) for idx, doc in enumerate(documents)