mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-06 19:38:30 +02:00
Shortcode for rendering code snippets from separate markdown files (#1548)
* shortcode for rendering code snippets from separate markdown files * formatted code * fix and readme * semi-automatically extracts snippets from markdown * extract snippets from points.md * extract snippets from vectors.md * extract snippets from payload.md * extract snippets from search.md + fixes * extract snippets from explore.md * extract snippets from hybrid-queries.md + mode query by id into search * extract snippets from filtering.md * extract snippets from storage.md + update outdated info * extract snippets from indexing.md * extract snippets from snapshots.md * extract snippets from guides/optimize.md * extract snippets from guides/multiple-partitions.md + fix aside note * extract snippets from guides/quantization.md * use auto-generated descriptions * order json snippets first --------- Co-authored-by: generall <andrey@vasnetsov.com>
This commit is contained in:
+1
@@ -0,0 +1 @@
|
||||
Sort your collection points by a custom payload key when using the scroll API. This feature enables you to order and retrieve the points based on a specific payload key, in this case, the `"timestamp"` field. Just keep in mind that for this to work efficiently, Qdrant needs a payload index supporting range filtering conditions.
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
```csharp
|
||||
await client.ScrollAsync("{collection_name}", limit: 15, orderBy: "timestamp");
|
||||
```
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
```go
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/qdrant/go-client/qdrant"
|
||||
)
|
||||
|
||||
client, err := qdrant.NewClient(&qdrant.Config{
|
||||
Host: "localhost",
|
||||
Port: 6334,
|
||||
})
|
||||
|
||||
client.Scroll(context.Background(), &qdrant.ScrollPoints{
|
||||
CollectionName: "{collection_name}",
|
||||
Limit: qdrant.PtrOf(uint32(15)),
|
||||
OrderBy: &qdrant.OrderBy{
|
||||
Key: "timestamp",
|
||||
},
|
||||
})
|
||||
```
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
```http
|
||||
POST /collections/{collection_name}/points/scroll
|
||||
{
|
||||
"limit": 15,
|
||||
"order_by": "timestamp", // <-- this!
|
||||
}
|
||||
```
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
```java
|
||||
import io.qdrant.client.grpc.Points.OrderBy;
|
||||
import io.qdrant.client.grpc.Points.ScrollPoints;
|
||||
|
||||
client.scrollAsync(ScrollPoints.newBuilder()
|
||||
.setCollectionName("{collection_name}")
|
||||
.setLimit(15)
|
||||
.setOrderBy(OrderBy.newBuilder().setKey("timestamp").build())
|
||||
.build()).get();
|
||||
```
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
```python
|
||||
client.scroll(
|
||||
collection_name="{collection_name}",
|
||||
limit=15,
|
||||
order_by="timestamp", # <-- this!
|
||||
)
|
||||
```
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
```rust
|
||||
use qdrant_client::qdrant::{OrderByBuilder, ScrollPointsBuilder};
|
||||
|
||||
client
|
||||
.scroll(
|
||||
ScrollPointsBuilder::new("{collection_name}")
|
||||
.limit(15)
|
||||
.order_by(OrderByBuilder::new("timestamp")),
|
||||
)
|
||||
.await?;
|
||||
```
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
```typescript
|
||||
client.scroll("{collection_name}", {
|
||||
limit: 15,
|
||||
order_by: "timestamp", // <-- this!
|
||||
});
|
||||
```
|
||||
Reference in New Issue
Block a user