agentleFS
GitHubKnown publishergithub/awesome-copilot/skills/qdrant-scaling/scaling-data-volume/sliding-time-window/SKILL.md

qdrant-sliding-time-window

Skill40k starsChanged 2 months agoMITView on GitHub

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'.

Trending

More talk lately.about the whole repository

Dec 2025: 8 mentionsJan 2026: 4 mentionsFeb 2026: 5 mentionsMar 2026: 9 mentionsApr 2026: 4 mentionsMay 2026: 2 mentionsJun 2026: 2 mentionsJul 2026: 2 mentionsAug 2026: 4 mentionsSep 2026: 8 mentionsOct 2026: 4 mentionsNov 2026: 3 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the github/awesome-copilot repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about github/awesome-copilot

The biggest 5 of 79 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 79

Talked about on Bluesky, GitHub and Hacker News (79 times).

On Bluesky · 42

37 more on Bluesky

On GitHub · 32

27 more on GitHub

The file

Show its rules and text

We split this skill into the rules it gives an agent

21 rules. About 0 are common, 18 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈18

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use when only recent data needs fast search -- social media posts, news articles, support tickets, logs, job listings.

    line 8
  2. Distinctive:

    Use when: data has natural time boundaries (daily, weekly, monthly).

    line 15
  3. Distinctive:

    Create a collection with user-defined sharding enabled

    line 17
  4. Very specific:

    Create one shard key per time period (e.g., 2025-01, 2025-02, ..., 2025-06)

    line 18
  5. Distinctive:

    When a new period starts, create a new shard key and redirect writes

    line 20
  6. Distinctive:

    Delete the oldest shard key outside the retention window

    line 21
  7. Very specific:

    Use shard_key_selector at query time to search only specific periods for efficiency

    line 25
  8. Distinctive:

    Use when: you need per-period collection configuration (e.g., different quantization or storage settings).

    line 31
  9. Distinctive:

    Create one collection per time period, point a write alias at the newest

    line 33
  10. Distinctive:

    When a new period starts, create the new collection and swap the write alias Switch collection

    line 35
  11. Distinctive:

    Use when: data arrives continuously without clear time boundaries, or you want the simplest setup.

    line 43
  12. Distinctive:

    Run cleanup during off-peak hours in batches (10k-50k points) to avoid optimizer locks

    line 49
  13. Distinctive:

    Does not reclaim disk instantly (compaction is asynchronous)

    line 51
  14. Distinctive:

    Use when: recent data needs fast in-RAM search, older data should remain searchable at lower performance.

    line 56
  15. Distinctive:

    Shard rotation: place current shard key on fast-storage nodes, move older shard keys to cheaper nodes via shard placement.

    line 58
  16. Very specific:

    Collection rotation: keep current collection in RAM (always_ram: true), move older collections to mmap/on-disk vectors.

    line 59
  17. Distinctive:

    Do not use filter-and-delete for high-volume time-series with millions of daily deletes (use rotation instead)

    line 64
  18. Distinctive:

    Do not forget to index the timestamp field (range filters without an index cause full scans)

    line 65
  19. Distinctive:

    Do not use collection rotation when shard rotation would suffice (unnecessary fan-out complexity)

    line 66
  20. Distinctive:

    Do not drop a shard key or collection before verifying its period is fully outside the retention window

    line 67
  21. Distinctive:

    Do not skip pre-creating the next period's shard key or collection (write failures during rotation are hard to recover)

    line 68

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

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

  1. Create a collection with user-defined sharding enabled
  2. Create one shard key per time period (e.g., 2025-01, 2025-02, ..., 2025-06)
  3. Ingest data into the current period's shard key
  4. When a new period starts, create a new shard key and redirect writes
  5. 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_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

  1. Create one collection per time period, point a write alias at the newest
  2. Query across all active collections in parallel, merge results client-side
  3. When a new period starts, create the new collection and swap the write alias Switch collection
  4. 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.

  1. Store a timestamp payload on every point, create a payload index on it Payload index
  2. Filter to the desired window at query time using range condition Range filter
  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 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)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.