Actions26
- Collection Actions
- Payload Actions
- Point Actions
- Search Actions
- Vector Actions
Overview
This node integrates with Qdrant, a vector search engine, to count the number of points in a specified collection. It is useful when you want to quickly determine how many data points (vectors) exist in a collection, optionally filtered by certain criteria or limited to specific shards. This can help monitor dataset sizes, validate data ingestion, or optimize queries based on collection size.
Practical examples:
- Counting all points in a collection to check if data ingestion completed successfully.
- Counting points that match a filter condition to understand subset sizes.
- Getting an approximate count quickly during indexing to estimate collection growth without waiting for exact counts.
Properties
| Name | Meaning |
|---|---|
| Collection Name | The target collection from which to count points. Can be selected from a list of existing collections or specified by name. |
| Filter | JSON object specifying conditions to filter points before counting. Only points satisfying these conditions are counted. |
| Exact | Boolean flag indicating whether to count the exact number of points (true) or get a faster approximate count (false). |
| Shard Key | JSON specifying which shards to include in the count. If omitted, all shards are considered. |
| Timeout | Number of seconds to override the global timeout for this request. |
Output
The node outputs a JSON object containing the count of points matching the criteria. The structure typically includes a numeric field representing the count. No binary data output is involved.
Example output JSON:
{
"count": 12345
}
Dependencies
- Requires connection to a Qdrant instance via its REST API.
- Needs an API key or authentication token configured in n8n credentials for Qdrant REST API access.
- The base URL of the Qdrant service must be set in the credentials.
Troubleshooting
- Timeouts: If the request times out, consider increasing the Timeout property or checking network connectivity to the Qdrant server.
- Invalid Filter JSON: Ensure the Filter property contains valid JSON syntax and correct filtering fields as per Qdrant's API specification.
- Collection Not Found: Verify the Collection Name exists in the Qdrant instance; otherwise, the count will fail.
- Approximate Count Inaccuracy: When Exact is false, the count may be unreliable during indexing. Use Exact=true for precise results at the cost of speed.
- Shard Key Errors: Incorrect shard keys may result in zero counts or errors. Confirm shard keys correspond to actual shards in the collection.