Fix HTTP code snippets (#2231)

This commit is contained in:
Abdon Pijpelink
2026-04-07 11:35:51 +02:00
committed by GitHub
parent cbbd26e9b0
commit 5705d7e2a2
18 changed files with 25 additions and 25 deletions
@@ -1,3 +1,3 @@
```http
GET http://localhost:6333/collections/{collection_name}/exists
GET /collections/{collection_name}/exists
```
@@ -1,5 +1,5 @@
```http
PUT collections/{collection_name}
PUT /collections/{collection_name}
{
"vectors": {
"size": 128,
@@ -1,6 +1,6 @@
```http
// Simple
PUT collections/{collection_name}/index
PUT /collections/{collection_name}/index
{
"field_name": "name_of_the_field_to_index",
"field_schema": {
@@ -11,7 +11,7 @@ PUT collections/{collection_name}/index
}
// Explicit
PUT collections/{collection_name}/index
PUT /collections/{collection_name}/index
{
"field_name": "name_of_the_field_to_index",
"field_schema": {
@@ -1,3 +1,3 @@
```http
DELETE http://localhost:6333/collections/{collection_name}
DELETE /collections/{collection_name}
```
@@ -6,7 +6,7 @@ PUT /collections/{collection_name}/points
"id": 1111,
"vector": [0.1, 0.2, 0.3]
},
]
],
"shard_key": "user_1"
}
```
@@ -1,5 +1,5 @@
```http
PUT collections/{collection_name}/points
PUT /collections/{collection_name}/points
{
"points": [
{
@@ -1,3 +1,3 @@
```http
GET collections/{collection_name}/optimizations?with=queued,completed
GET /collections/{collection_name}/optimizations?with=queued,completed
```
@@ -1,5 +1,5 @@
```http
POST /collections/{collection_name}/query/batch
POST /collections/{collection_name}/points/query/batch
{
"searches": [
{
@@ -2,7 +2,7 @@
POST /collections/{collection_name}/points/query
{
"query": {
"relevance_feedback: {
"relevance_feedback": {
"target": [0.1, 0.9, 0.23, ...],
"feedback": [
{ "example": 111, "score": 0.68 },
@@ -10,13 +10,13 @@ POST /collections/{collection_name}/points/query
{ "example": 333, "score": 0.61 }
],
"strategy": {
"naive": {
"a": 0.12,
"b": 0.43,
"c": 0.03
"naive": {
"a": 0.12,
"b": 0.43,
"c": 0.03
}
}
]
}
}
}
```
@@ -2,7 +2,7 @@
POST /collections/{collection_name}/points/query
{
"query": "43cf51e2-8777-4f52-bc74-c2cbde0c8b04", // <--- point id
"using": "512d-vector"
"using": "512d-vector",
"lookup_from": {
"collection": "another_collection", // <--- other collection name
"vector": "image-512" // <--- vector name in the other collection
@@ -4,11 +4,11 @@ POST /collections/{collection_name}/points/query
"prefetch": {
"prefetch": {
"query": [1, 23, 45, 67], // <------ small byte vector
"using": "mrl_byte"
"using": "mrl_byte",
"limit": 1000
},
"query": [0.01, 0.45, 0.67, ...], // <-- full dense vector
"using": "full"
"using": "full",
"limit": 100
},
"query": [ // <─┐
@@ -3,7 +3,7 @@ POST /collections/{collection_name}/points/query
{
"prefetch": {
"query": [1, 23, 45, 67], // <------------- small byte vector
"using": "mrl_byte"
"using": "mrl_byte",
"limit": 1000
},
"query": [0.01, 0.299, 0.45, 0.67, ...], // <-- full vector
@@ -1,5 +1,5 @@
```http
POST collections/{collection_name}/points/query
POST /collections/{collection_name}/points/query
{
"query": [
[-0.013, 0.020, -0.007, -0.111, ...],
@@ -10,7 +10,7 @@ POST /collections/{collection_name}/points/query
"gauss_decay": {
"x": {
"geo_distance": {
"origin": { "lat": 52.504043, "lon": 13.393236 }
"origin": { "lat": 52.504043, "lon": 13.393236 },
"to": "geo.location"
}
},
@@ -4,7 +4,7 @@ POST /collections/{collection_name}/points/query
"prefetch": {
"query": [0.2, 0.8, ...], // <-- dense vector
"limit": 50
}
},
"query": {
"formula": {
"sum": [
@@ -1,5 +1,5 @@
```http
PUT /collections/books?wait=true
PUT /collections/books
{
"sparse_vectors": {
"title-bm25": {
@@ -1,5 +1,5 @@
```http
PUT /collections/books?wait=true
PUT /collections/books
{
"vectors": {
"description-dense": {
@@ -1,5 +1,5 @@
```http
POST /collections/books/points/query?wait=true
POST /collections/books/points/query
{
"query": {
"text": "time travel",