Skip to main content

Build

Qdrant Sliding Time Window

Qdrant SkillsOfficialCertified

Guides sliding time window scaling in Qdrant. Use when someone asks 'only recent data matters', 'how to expire old vectors', 'time-based data rotation', 'delete old data efficiently', 'social media feed search', 'news search', 'log search with retention', or 'how to keep only last N months of data'. Also use when periodic delete-by-filter cleanup of old points causes slowdowns or disk usage doesn't drop after deletes.

  • New
  • v1.0.6
  • Reviewed Jul 21
  • No reviews yet

Capabilities

  • Shard Rotation (Recommended)

    Create one shard key per time period, write to the current one, and…

  • Collection Rotation (Alias Swap)

    Create one collection per period behind a write alias, swap the alias…

  • Filter-and-Delete

  • Hot/Cold Tiers

Getting started

Full instructions

Install the skill, then ask your AI tool for the task in plain words. The full SKILL.md below shows what it covers.

Instructions: SKILL.mdv1.0.6

Scaling 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).

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 one shard key per time period, write to the current one, and delete the oldest shard key once it leaves the retention window. The Time-Based Sharding tutorial walks through the setup.

  • 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_selector at 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 period behind a write alias, swap the alias to the new collection when a period starts Switch collection, and drop the oldest collection outside the window. Queries must fan out across all active collections in parallel and merge results client-side.

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.

  1. Store the timestamp as a datetime payload on every point and index it Payload index
  2. Filter to the desired window at query time with a datetime range condition Datetime range
  3. 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 the current collection's quantized vectors in RAM (memory: pinned on Qdrant 1.19 or newer, always_ram: true on 1.18 or older) and its dense vectors in page cache (memory: cached, the default; Qdrant rejects pinned for dense vectors), move older collections to mmap/on-disk vectors (memory: cold on 1.19 or newer, on_disk: true on 1.18 or older). 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)

Explore more skills

Browse all
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

More from Qdrant Skills

View source →
qdrant-advisorDiagnose, troubleshoot, and advise on any Qdrant deployment by loading the latest official Qdrant skills live from skills.qdrant.tech. Use this whenever someone raises a Qdrant problem or question — slow or degraded search, high or growing…0 installsqdrant-minimize-latencyGuides Qdrant query latency optimization. Use when someone asks 'search is slow', 'how to reduce latency', 'p99 is too high', 'tail latency', 'single query too slow', 'how to make search faster', or 'latency spikes'.0 installsqdrant-model-migrationGuides embedding model migration in Qdrant without downtime. Use when someone asks 'how to switch embedding models', 'how to migrate vectors', 'how to update to a new model', 'zero-downtime model change', 'how to re-embed my data', or 'can…0 installsqdrant-memory-usage-optimizationDiagnoses and reduces Qdrant memory usage. Use when someone reports 'memory too high', 'RAM keeps growing', 'node crashed', 'out of memory', 'memory leak', or asks 'why is memory usage so high?', 'how to reduce RAM?'. Also use when memory…0 installsqdrant-search-strategiesGuides Qdrant search strategy selection. Use when someone asks 'should I use hybrid search?', 'how to rerank?', 'results are not relevant', 'I don't get needed results from my dataset but they're there', 'retrieval quality is not good…0 installsqdrant-tenant-scalingGuides Qdrant multi-tenant scaling. Use when someone asks 'how to scale tenants', 'one collection per tenant?', 'tenant isolation', 'dedicated shards', or reports tenant performance issues. Also use when multi-tenant workloads outgrow…0 installs

Frequently asked questions about qdrant-sliding-time-window

What does the qdrant-sliding-time-window skill do?

Guides sliding time window scaling in Qdrant. Use when someone asks 'only recent data matters', 'how to expire old vectors', 'time-based data rotation', 'delete old data efficiently', 'social media feed search', 'news search', 'log search with retention', or 'how to keep only last N months of data'. Also use when periodic delete-by-filter cleanup of old points causes slowdowns or disk usage doesn't drop after deletes. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the qdrant-sliding-time-window skill?

Run `npx @skills-hub-ai/cli install qdrant-sliding-time-window` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/qdrant-sliding-time-window/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does qdrant-sliding-time-window work with?

qdrant-sliding-time-window runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the qdrant-sliding-time-window skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use qdrant-sliding-time-window after installing it?

In Claude Code, type `/qdrant-sliding-time-window` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the qdrant-sliding-time-window skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.

Badge for your README

Show that this skill is on Skills Hub. The badge links back to this page and shows the live install count.

Install on Skills Hub badge preview
Markdown
[![Install on Skills Hub](https://skills-hub.ai/api/badges/skill/qdrant-sliding-time-window)](https://skills-hub.ai/skills/qdrant-sliding-time-window)
HTML
<a href="https://skills-hub.ai/skills/qdrant-sliding-time-window"><img src="https://skills-hub.ai/api/badges/skill/qdrant-sliding-time-window" alt="Install on Skills Hub"></a>

More options in the badge docs.