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 @@
|
||||
This code snippet is a request to retrieve facet counts for a specific key within a collection. The response will contain values sorted by count in descending order and then by value in ascending order. It specifies that only values with non-zero counts will be included in the results. By setting the `exact` parameter to `true`, it ensures that the counts returned are precise instead of approximate, which is useful for debugging storage or when an exact count is needed.
|
||||
@@ -0,0 +1,9 @@
|
||||
```csharp
|
||||
using Qdrant.Client;
|
||||
|
||||
await client.FacetAsync(
|
||||
"{collection_name}",
|
||||
key: "size",
|
||||
exact: true,
|
||||
);
|
||||
```
|
||||
@@ -0,0 +1,7 @@
|
||||
```go
|
||||
res, err := client.Facet(ctx, &qdrant.FacetCounts{
|
||||
CollectionName: "{collection_name}",
|
||||
Key: "key",
|
||||
Exact: true,
|
||||
})
|
||||
```
|
||||
@@ -0,0 +1,7 @@
|
||||
```http
|
||||
POST /collections/{collection_name}/facet
|
||||
{
|
||||
"key": "size",
|
||||
"exact": true
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,10 @@
|
||||
```java
|
||||
client
|
||||
.facetAsync(
|
||||
Points.FacetCounts.newBuilder()
|
||||
.setCollectionName(collection_name)
|
||||
.setKey("foo")
|
||||
.setExact(true)
|
||||
.build())
|
||||
.get();
|
||||
```
|
||||
@@ -0,0 +1,7 @@
|
||||
```python
|
||||
client.facet(
|
||||
collection_name="{collection_name}",
|
||||
key="size",
|
||||
exact=True,
|
||||
)
|
||||
```
|
||||
@@ -0,0 +1,11 @@
|
||||
```rust
|
||||
use qdrant_client::qdrant::FacetCountsBuilder;
|
||||
|
||||
client
|
||||
.facet(
|
||||
FacetCountsBuilder::new("{collection_name}", "size")
|
||||
.limit(10)
|
||||
.exact(true),
|
||||
)
|
||||
.await?;
|
||||
```
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
```typescript
|
||||
client.facet("{collection_name}", {
|
||||
key: "size",
|
||||
exact: true,
|
||||
});
|
||||
```
|
||||
Reference in New Issue
Block a user