
Qdrant Sliding Time Window
OfficialFreeEfficiently manage time-sensitive data in Qdrant.
Free · Opens the source repo
What Qdrant Sliding Time Window does
The Qdrant Sliding Time Window skill provides guidance on how to effectively manage and scale time-sensitive data within Qdrant, a vector database. This skill is particularly useful for applications where only recent data is relevant, such as social media feeds, news articles, support tickets, and logs. By implementing a sliding time window strategy, developers can ensure that older data is efficiently expired or archived, thereby optimizing search performance and resource utilization.
The skill outlines three primary strategies for managing time-based data: shard rotation, collection rotation, and filter-and-delete. Shard rotation is the recommended approach when data has natural time boundaries, allowing for efficient queries across multiple time periods without the need for application-level fan-out. Collection rotation is suitable when different configurations for each time period are needed, although it introduces more operational complexity. The filter-and-delete method is the simplest option, ideal for continuous data streams without clear time boundaries, but it requires careful management to avoid performance degradation.
This skill is designed for developers and data engineers who need to implement efficient data retention and expiration policies in Qdrant. It provides step-by-step instructions and best practices for each strategy, ensuring that users can maintain optimal performance while managing large volumes of time-sensitive data. By following the guidelines provided, users can avoid common pitfalls and ensure that their data management processes are both effective and efficient.
When to use it
Use this skill when you need to efficiently manage and search through recent data, particularly in applications like social media, news, or logs.
When not to use it
This skill may not be suitable for high-volume time-series data requiring frequent deletes, where shard rotation would be more effective.
What you can build with it
Social Media Feed Management
Utilize the sliding time window to efficiently manage and search through recent social media posts, ensuring only relevant content is retained.
News Article Archiving
Implement shard rotation to archive older news articles while maintaining fast access to the latest articles for users.
Log Data Retention
Apply filter-and-delete strategies to manage log data, ensuring that only the most recent logs are kept, while older logs are efficiently removed.
How to install Qdrant Sliding Time Window
View source1. Install with the skills CLI
npx skills add github/awesome-copilot/sliding-time-window --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by githubScaling with a Sliding Time Window
Use when only recent data needs fast search -- social media posts, news articles, support tickets, logs, job listings. Old data either becomes irrelevant or can tolerate slower access.
Three strategies: shard rotation (recommended), collection rotation (when per-period config differs), and filter-and-delete (simplest, for continuous cleanup).
Shard Rotation (Recommended)
Use when: data has natural time boundaries (daily, weekly, monthly). Preferred because queries span all time periods in one request without application-level fan-out. User-defined sharding
- Create a collection with user-defined sharding enabled
- Create one shard key per time period (e.g.,
2025-01,2025-02, ...,2025-06) - Ingest data into the current period's shard key
- When a new period starts, create a new shard key and redirect writes
- Delete the oldest shard key outside the retention window
- Deleting a shard key reclaims all resources instantly (no fragmentation, no optimizer overhead)
- Pre-create the next period's shard key before rotation to avoid write disruption
- Use
shard_key_selectorat query time to search only specific periods for efficiency - Shard keys can be placed on specific nodes for hot/cold tiering
Collection Rotation (Alias Swap)
Use when: you need per-period collection configuration (e.g., different quantization or storage settings). Collection aliases
- Create one collection per time period, point a write alias at the newest
- Query across all active collections in parallel, merge results client-side
- When a new period starts, create the new collection and swap the write alias Switch collection
- Drop the oldest collection outside the window
Trade-off vs shard rotation: allows per-collection config differences, but requires application-level fan-out and more operational overhead.
Filter-and-Delete
Use when: data arrives continuously without clear time boundaries, or you want the simplest setup.
- Store a
timestamppayload on every point, create a payload index on it Payload index - Filter to the desired window at query time using
rangecondition Range filter - Periodically delete expired points using delete-by-filter Delete points
- Run cleanup during off-peak hours in batches (10k-50k points) to avoid optimizer locks
- Deletes are not free: tombstoned points degrade search until optimizer compacts segments
- Does not reclaim disk instantly (compaction is asynchronous)
Hot/Cold Tiers
Use when: recent data needs fast in-RAM search, older data should remain searchable at lower performance.
- Shard rotation: place current shard key on fast-storage nodes, move older shard keys to cheaper nodes via shard placement. All queries still go through a single collection.
- Collection rotation: keep current collection in RAM (
always_ram: true), move older collections to mmap/on-disk vectors. Quantization
What NOT to Do
- Do not use filter-and-delete for high-volume time-series with millions of daily deletes (use rotation instead)
- Do not forget to index the timestamp field (range filters without an index cause full scans)
- Do not use collection rotation when shard rotation would suffice (unnecessary fan-out complexity)
- Do not drop a shard key or collection before verifying its period is fully outside the retention window
- Do not skip pre-creating the next period's shard key or collection (write failures during rotation are hard to recover)
Frequently asked questions about Qdrant Sliding Time Window
Similar skills
ClickHouse Logs Queries
Efficiently manage Supabase logs with ClickHouse SQL.
EF Core D2 Database Diagram Generator
Visualize your EF Core models as D2 diagrams effortlessly.
Safe SQL Execution
Ensure secure SQL execution in Supabase applications.
Oracle to PostgreSQL Migration
Identify migration risks between Oracle and PostgreSQL.
SSMA Console
Streamline Oracle to SQL Server migrations with ease.
SQL Performance Optimization
Enhance SQL query efficiency across all databases.
