mirror of
https://github.com/qdrant/landing_page.git
synced 2026-09-30 16:38:31 +02:00
fix and refactor python examples (#770)
* fix: fix points selector bugs, refactor code * fix: fix and refactor embeddings * fix: fix and refactor frameworks * refactor: refactor guides * fix: fix and refactor aleph-alpha tutorial * fix: fix and refactor tutorials * refactoring: refactor quick-start * fix: address review comments * fix: replace remaining host
This commit is contained in:
@@ -39,7 +39,10 @@ Qdrant is now accessible:
|
||||
```python
|
||||
from qdrant_client import QdrantClient
|
||||
|
||||
client = QdrantClient("localhost", port=6333)
|
||||
client = QdrantClient(url="http://localhost:6333")
|
||||
```
|
||||
|
||||
```typescript
|
||||
```
|
||||
|
||||
```typescript
|
||||
@@ -78,7 +81,7 @@ var client = new QdrantClient("localhost", 6334);
|
||||
You will be storing all of your vector data in a Qdrant collection. Let's call it `test_collection`. This collection will be using a dot product distance metric to compare vectors.
|
||||
|
||||
```python
|
||||
from qdrant_client.http.models import Distance, VectorParams
|
||||
from qdrant_client.models import Distance, VectorParams
|
||||
|
||||
client.create_collection(
|
||||
collection_name="test_collection",
|
||||
@@ -135,7 +138,7 @@ await client.CreateCollectionAsync(
|
||||
Let's now add a few vectors with a payload. Payloads are other data you want to associate with the vector:
|
||||
|
||||
```python
|
||||
from qdrant_client.http.models import PointStruct
|
||||
from qdrant_client.models import PointStruct
|
||||
|
||||
operation_info = client.upsert(
|
||||
collection_name="test_collection",
|
||||
@@ -524,7 +527,7 @@ See [payload and vector in the result](../concepts/search/#payload-and-vector-in
|
||||
We can narrow down the results further by filtering by payload. Let's find the closest results that include "London".
|
||||
|
||||
```python
|
||||
from qdrant_client.http.models import Filter, FieldCondition, MatchValue
|
||||
from qdrant_client.models import Filter, FieldCondition, MatchValue
|
||||
|
||||
search_result = client.search(
|
||||
collection_name="test_collection",
|
||||
|
||||
Reference in New Issue
Block a user