-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* docs: New cURL snippets * Sync OpenAPI * set_payload multi val * Sync OpenAPI * Update delete_points.sh * Sync OpenAPI --------- Co-authored-by: Anush008 <Anush008@users.noreply.github.com>
- Loading branch information
Showing
46 changed files
with
1,404 additions
and
49 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
curl -X POST \ | ||
'http://localhost:6333/collections/collection_name/points/batch' \ | ||
--header 'Content-Type: application/json' \ | ||
--header 'api-key: <api-key-value>' \ | ||
--data-raw '{ | ||
"operations": [ | ||
{ | ||
"upsert": { | ||
"points": [ | ||
{ | ||
"id": 1, | ||
"vector": [ | ||
0.4, | ||
0.3, | ||
0.2, | ||
0.1 | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"update_vectors": { | ||
"points": [ | ||
{ | ||
"id": 1, | ||
"vector": [ | ||
0.11, | ||
0.22, | ||
0.33, | ||
0.44 | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"set_payload": { | ||
"payload": { | ||
"test_payload_2": 2, | ||
"test_payload_3": 3 | ||
}, | ||
"points": [ | ||
1 | ||
] | ||
} | ||
} | ||
] | ||
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
curl -X POST \ | ||
'http://localhost:6333/collections/collection_name/points/payload/clear' \ | ||
--header 'Content-Type: application/json' \ | ||
--header 'api-key: <api-key-value>' \ | ||
--data-raw '{ | ||
"points": [ | ||
0, | ||
3, | ||
100 | ||
] | ||
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
curl -X GET \ | ||
'http://localhost:6333/collections/collection_name/exists' \ | ||
--header 'api-key: <api-key-value>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Count total number of points in a collection | ||
curl -X POST \ | ||
'http://localhost:6333/collections/collection_name/points/count' \ | ||
--header 'api-key: <api-key-value>' \ | ||
--header 'Content-Type: application/json' \ | ||
--data-raw '{ | ||
"exact": true | ||
}' | ||
|
||
# Count points satisfying a filter condition | ||
curl -X POST \ | ||
'http://localhost:6333/collections/collection_name/points/count' \ | ||
--header 'api-key: <api-key-value>' \ | ||
--header 'Content-Type: application/json' \ | ||
--data-raw '{ | ||
"filter": { | ||
"must": [ | ||
{ | ||
"key": "color", | ||
"match": { | ||
"value": "red" | ||
} | ||
} | ||
] | ||
}, | ||
"exact": true | ||
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,32 @@ | ||
# Minimal curl command to create a collection with a vector field | ||
# Create a collection with default dense vector | ||
curl -X PUT \ | ||
'http://localhost:6333/collections/collection_name' \ | ||
--header 'api-key: <api-key-value>' \ | ||
--header 'Content-Type: application/json' \ | ||
--data-raw '{ | ||
"vectors": { | ||
"size": 384, | ||
"distance": "Cosine" | ||
} | ||
}' | ||
|
||
curl -X PUT http://localhost:6333/collections/collection_name \ | ||
-H "api-key: <apiKey>" \ | ||
-H "Content-Type: application/json" \ | ||
-d '{ | ||
"vectors": { | ||
"size": 300, | ||
"distance": "Cosine" | ||
} | ||
}' | ||
|
||
# Or with a sparse vector field | ||
|
||
curl -X PUT http://localhost:6333/collections/collection_name \ | ||
-H "api-key: <apiKey>" \ | ||
-H "Content-Type: application/json" \ | ||
-d '{ | ||
"vectors": { | ||
"size": 1536, | ||
"distance": "Cosine" | ||
}, | ||
"sparse_vectors": { | ||
"splade-model-name": { | ||
"index": { | ||
"on_disk": true | ||
} | ||
} | ||
} | ||
}' | ||
# Create a collection with named dense and sparse vectors | ||
curl -X PUT \ | ||
'http://localhost:6333/collections/collection_name' \ | ||
--header 'api-key: <api-key-value>' \ | ||
--header 'Content-Type: application/json' \ | ||
--data-raw '{ | ||
"vectors": { | ||
"dense-vector-name": { | ||
"size": 1536, | ||
"distance": "Cosine" | ||
}, | ||
"sparse_vectors": { | ||
"sparse-vector-name": { | ||
"index": { | ||
"on_disk": true | ||
} | ||
} | ||
} | ||
} | ||
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
curl -X PUT \ | ||
'http://localhost:6333/collections/collection_name/index' \ | ||
--header 'api-key: <api-key-value>' \ | ||
--header 'Content-Type: application/json' \ | ||
--data-raw '{ | ||
"field_name": "field_name", | ||
"field_schema": "keyword" | ||
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
curl -X POST \ | ||
'http://localhost:6333/snapshots' \ | ||
--header 'api-key: <api-key-value>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
curl -X PUT \ | ||
'http://localhost:6333/collections/collection_name/shards' \ | ||
--header 'api-key: <api-key-value>' \ | ||
--header 'Content-Type: application/json' \ | ||
--data-raw '{ | ||
"shard_key": "{shard_key}" | ||
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
curl -X POST \ | ||
'http://localhost:6333/collections/collection_name/snapshots' \ | ||
--header 'api-key: <api-key-value>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
curl -X DELETE \ | ||
'http://localhost:6333/collections/collection_name' \ | ||
--header 'api-key: <api-key-value>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
curl -X DELETE \ | ||
'http://localhost:6333/collections/collection_name/index/field_name' \ | ||
--header 'api-key: <api-key-value>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
curl -X DELETE \ | ||
'http://localhost:6333/snapshots/snapshot_name' \ | ||
--header 'api-key: <api-key-value>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Delete payload by ID | ||
curl -X POST \ | ||
'http://localhost:6333/collections/collection_name/points/payload/delete' \ | ||
--header 'api-key: <api-key-value>' \ | ||
--header 'Content-Type: application/json' \ | ||
--data-raw '{ | ||
"keys": [ | ||
"color", | ||
"price" | ||
], | ||
"points": [ | ||
0, | ||
3, | ||
100 | ||
] | ||
}' | ||
|
||
# Delete payload by filter | ||
curl -X POST \ | ||
'http://localhost:6333/collections/collection_name/points/payload/delete' \ | ||
--header 'api-key: <api-key-value>' \ | ||
--header 'Content-Type: application/json' \ | ||
--data-raw '{ | ||
"keys": [ | ||
"color", | ||
"price" | ||
], | ||
"filter": { | ||
"must": [ | ||
{ | ||
"key": "color", | ||
"match": { | ||
"value": "red" | ||
} | ||
} | ||
] | ||
} | ||
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Delete points by IDs | ||
curl -X POST \ | ||
'http://localhost:6333/collections/collection_name/points/delete' \ | ||
--header 'api-key: <api-key-value>' \ | ||
--header 'Content-Type: application/json' \ | ||
--data-raw '{ | ||
"points": [ | ||
0, | ||
3, | ||
100 | ||
] | ||
}' | ||
|
||
# Delete points by filter | ||
curl -X POST \ | ||
'http://localhost:6333/collections/collection_name/points/delete' \ | ||
--header 'api-key: <api-key-value>' \ | ||
--header 'Content-Type: application/json' \ | ||
--data-raw '{ | ||
"filter": { | ||
"must": [ | ||
{ | ||
"key": "color", | ||
"match": { | ||
"value": "red" | ||
} | ||
} | ||
] | ||
} | ||
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
curl -X POST \ | ||
'http://localhost:6333/collections/collection_name/shards/delete' \ | ||
--header 'api-key: <api-key-value>' \ | ||
--header 'Content-Type: application/json' \ | ||
--data-raw '{ | ||
"shard_key": "{shard_key}" | ||
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
curl -X DELETE \ | ||
'http://localhost:6333/collections/collection_name/snapshots/snapshot_name' \ | ||
--header 'api-key: <api-key-value>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Delete vectors by ID | ||
curl -X POST \ | ||
'http://localhost:6333/collections/collection_name/points/vectors/delete' \ | ||
--header 'api-key: <api-key-value>' \ | ||
--header 'Content-Type: application/json' \ | ||
--data-raw '{ | ||
"points": [ | ||
0, | ||
3, | ||
10 | ||
], | ||
"vectors": [ | ||
"text", | ||
"image" | ||
] | ||
}' | ||
|
||
# Delete vectors by filter | ||
curl -X POST \ | ||
'http://localhost:6333/collections/collection_name/points/vectors/delete' \ | ||
--header 'api-key: <api-key-value>' \ | ||
--header 'Content-Type: application/json' \ | ||
--data-raw '{ | ||
"filter": { | ||
"must": [ | ||
{ | ||
"key": "color", | ||
"match": { | ||
"value": "red" | ||
} | ||
} | ||
] | ||
}, | ||
"vectors": [ | ||
"text", | ||
"image" | ||
] | ||
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
curl -X POST \ | ||
'http://localhost:6333/collections/collection_name/points/discover/batch' \ | ||
--header 'api-key: <api-key-value>' \ | ||
--header 'Content-Type: application/json' \ | ||
--data-raw '{ | ||
"searches": [ | ||
{ | ||
"target": [ | ||
0.2, | ||
0.1, | ||
0.9, | ||
0.7 | ||
], | ||
"context": [ | ||
{ | ||
"positive": "7f6652c4-89bd-40e0-ab1d-510f7fcddd2b", | ||
"negative": "2c2c9f86-0171-4bd2-9ab0-b4754682cddd" | ||
} | ||
], | ||
"limit": 1 | ||
}, | ||
{ | ||
"target": [ | ||
0.5, | ||
0.3, | ||
0.2, | ||
0.3 | ||
], | ||
"context": [ | ||
{ | ||
"positive": 342, | ||
"negative": 213 | ||
} | ||
], | ||
"limit": 1 | ||
} | ||
] | ||
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
curl -X POST \ | ||
'http://localhost:6333/collections/collection_name/points/discover' \ | ||
--header 'api-key: <api-key-value>' \ | ||
--header 'Content-Type: application/json' \ | ||
--data-raw '{ | ||
"target": [ | ||
0.2, | ||
0.1, | ||
0.9, | ||
0.7 | ||
], | ||
"context": [ | ||
{ | ||
"positive": "7f6652c4-89bd-40e0-ab1d-510f7fcddd2b", | ||
"negative": "2c2c9f86-0171-4bd2-9ab0-b4754682cddd" | ||
} | ||
], | ||
"limit": 10 | ||
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
curl -X GET \ | ||
'http://localhost:6333/collections/collection_name' \ | ||
--header 'api-key: <api-key-value>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
curl -X GET \ | ||
'http://localhost:6333/collections/collection_name/aliases' \ | ||
--header 'api-key: <api-key-value>' |
Oops, something went wrong.