SShortSingh.
Back to feed

Developers Use Partition Key Sharding to Bypass DynamoDB Vector Search 100-Result Cap

0
·1 views

DynamoDB added vector search support in August 2026, but limits each query to a maximum of 100 results (TopK=100), restricting use cases that require broad retrieval before reranking. A developer published a workaround using partition key sharding, splitting data across multiple shard groups using a SHA-256 hash of each item's ID. Queries are fired in parallel against all shards simultaneously, and results are merged and sorted by distance score on the application side. With five shards, this approach effectively raises the practical result ceiling to 500 per search. The method contrasts with Amazon S3 Vectors, which raised its own TopK limit from 100 to 10,000 in June 2026, highlighting an ongoing gap in DynamoDB's vector search capabilities.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Power BI Data Modelling: How Fact and Dimension Tables Drive Accurate Insights

Data modelling in Power BI involves structuring datasets into a framework that ensures accuracy, optimises performance, and simplifies reporting. Rather than storing all data in a single flat table, the approach separates information into fact tables, which hold quantitative transactional data, and dimension tables, which provide descriptive context. Relationships between these tables allow filters and calculations to flow predictably, making DAX formula writing more reliable and less error-prone. Key design decisions around granularity, cardinality, and entity relationships determine how data is split and organised across tables. A well-built model is also scalable, allowing new data sources or metrics to be added without rebuilding the entire structure.

0
ProgrammingDEV Community ·

Developer Uses IndexedDB to Cut Repeated HTML Transfers on Lightweight Sites

A developer has built a system that stores a site's main HTML document in the browser's IndexedDB on a user's first visit, then restores it locally on all subsequent visits instead of re-downloading it. The approach uses two files — a lightweight loader and the main HTML body — hosted on the same domain, since IndexedDB is managed per origin. A drag-and-drop tool has been released that converts any standard HTML file into this two-file format and packages the output as a ZIP archive. The method is best suited for near-single-page sites with large HTML files that are opened repeatedly by the same users. External resources such as images, CSS, and JavaScript are still fetched normally, and browser caching continues to function alongside this system.

0
ProgrammingDEV Community ·

How to Safely Review AI-Generated Terraform Code Before It Destroys Your Infrastructure

AI tools like GitHub Copilot can assist with writing Terraform configuration, but accepting generated code without review risks serious infrastructure damage, including accidental database deletion. Running terraform validate only checks schema correctness and does not flag insecure settings like open S3 buckets or permissive IAM policies, so additional scanners such as checkov or tfsec are essential in CI pipelines. Engineers should always search plan output for the phrase 'forces replacement', which signals a delete-then-recreate operation that can cause data loss on stateful resources like RDS instances or EBS volumes. Copilot tends to default to count-based resource iteration, which tracks resources by index and can silently destroy and re-create infrastructure when list items are removed, whereas for_each tracks by key and is safer for collections. Other common pitfalls include omitting validation blocks on bounded variables and misplacing checkov skip comments outside resource blocks, where they are silently ignored by the scanner.

0
ProgrammingDEV Community ·

How to Build Safer Social Media Publishing Automation With Staged Validation

Reliable social publishing automation requires more than confirming a post button was clicked, as errors like wrong accounts, duplicate posts, or incomplete content can go undetected. A safer approach divides the process into three stages: preparation, submission, and verification. Before posting, the automation should confirm the correct account, page, editor state, and media are all in order. The submission step should be treated as a single, deliberate and irreversible action, never retried blindly if the outcome is unclear. Finally, success should be confirmed by checking for the published post outside the editor, not by relying on the editor's own state.

Developers Use Partition Key Sharding to Bypass DynamoDB Vector Search 100-Result Cap · ShortSingh