SShortSingh.
Back to feed

How to Add Semantic Search to a Next.js Site Using Sanity's Native Embeddings

0
·1 views

Sanity's native Embeddings feature, available on Growth and Enterprise plans as of mid-2026, enables vector-based semantic search directly within a dataset without requiring a separate service or manual infrastructure setup. Developers can configure which document types and fields get indexed through Sanity Studio or the Manage dashboard, and Sanity automatically backfills existing documents and re-embeds updated ones on publish. Semantic queries are executed using the dedicated GROQ function sanity::embeddings.query, which accepts a natural-language string and returns documents ranked by similarity. In a Next.js app, the recommended approach is to run these queries inside a server-side route handler to keep the Sanity read token out of the browser. The overall integration involves three steps: configuring the index, querying it via a Next.js API route, and rendering results in a client-side search UI component.

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 ·

12.4 Million US Business Records Available Free via Five State Open-Data Portals

Five US states — New York, Colorado, Pennsylvania, Oregon, and Connecticut — publicly host their full business registries on Socrata open-data portals, covering approximately 12.4 million entities with commercial use explicitly permitted. The datasets include details such as entity names, types, formation dates, addresses, and registered agents, accessible through documented SODA API endpoints. New York's dataset is the largest at 4.22 million active corporations, with records dating back to 1800, while a companion filing-history dataset adds another 20.6 million rows. A developer team built a Python fetcher to pull and normalize the data across all five states, mapping inconsistent column names into a unified schema with pagination and resume support. The project highlights a lesser-known alternative to paid services like OpenCorporates, though notable gaps remain — Delaware, home to a disproportionate share of US incorporations, offers no bulk access or public API.

0
ProgrammingDEV Community ·

New Database Architectures Promise Genuine Elasticity by Decoupling Compute and Storage

For years, so-called serverless databases failed to deliver true elasticity, often functioning as rebranded auto-scaling groups that still left organizations with idle costs and capacity planning burdens. A new generation of distributed database architectures is now emerging that fundamentally separates the compute and storage layers, enabling resources to be allocated and released dynamically — even at the individual query level. In this model, a shared distributed storage fabric handles data persistence and scales automatically with data volume, while a separate pool of compute units is provisioned on demand per workload. This decoupled design allows systems to scale down to near-zero during idle periods and burst to handle heavy loads, with users paying only for actual consumption. The shift represents a significant architectural departure from traditional instance-based databases and may finally deliver on the long-standing promise of genuine pay-as-you-go database services.

0
ProgrammingDEV Community ·

Dark-Web Actor Claims KakaoTalk Source Code Sale; Real Target Likely ZigZag

A threat actor named ExtortionLord posted a dark-web listing in early July 2026 claiming to sell KakaoTalk's full source code, internal network access, and databases. Cybersecurity researchers say the listing's repository names reference ZigZag and Kakao Style, suggesting the actual target is ZigZag, a fashion e-commerce platform under the Kakao umbrella, not the messaging app itself. Analysts believe the KakaoTalk branding was used deliberately to inflate the listing's attention and extortion value. The claim remains unverified, but if authentic, the combination of source code and infrastructure access would represent a significantly more severe incident than recent South Korean data breaches at TVING and BGF Networks. Authorities and the companies involved have not yet issued public statements confirming or denying the breach.

0
ProgrammingDEV Community ·

Why Software Architecture Flaws Stay Hidden Until It's Too Late

Unlike physical engineering, software produces no direct feedback when its underlying architecture is flawed — a poorly structured system compiles, runs, and passes tests just as a well-designed one does. This makes it nearly impossible to prove that a wrong architectural decision caused a problem, since the alternative design was never built for comparison. Teams typically measure software quality by whether it works functionally, but a system can satisfy every requirement for years while its core business logic quietly fragments across duplicated, inconsistent code. When that fragmentation finally causes a breakdown, the true cause is long buried under layers of changes, departed developers, and accumulated complexity. The result is that structural mistakes are almost always misdiagnosed as domain complexity or changing requirements, never as the early design decisions that actually set the failure in motion.