---
title: "Build Vector Search in .NET with Postgres and pgvector"
url: https://daily.dev/posts/build-vector-search-in-net-with-postgres-and-pgvector-6rxktqqyl
source_url: https://www.youtube.com/watch?v=c_YZazjQrNs
type: video:youtube
source: "We Are .NET"
published: 2026-05-22T11:57:36.305Z
updated: 2026-05-22T11:57:55.744Z
tags: [".net", "postgresql", "vector-search", "ollama", "pgvector"]
reading_time: 17
upvotes: 3
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Build Vector Search in .NET with Postgres and pgvector

**[We Are .NET](https://daily.dev/sources/wearedotnet)** · 17 min read · 3 upvotes · 0 comments

## Summary

A practical walkthrough of implementing vector similarity search in .NET using PostgreSQL with the pgvector extension. The tutorial covers setting up a Postgres container with pgvector pre-installed via .NET Aspire, running an Ollama embedding model (Qwen3 0.6B), generating 1024-dimension embeddings for ~180 blog articles, storing them in Postgres, and performing cosine-distance semantic search queries. The implementation uses Dapper for database access, Microsoft.Extensions.AI for the embedding generator abstraction, and HNSW indexing for efficient approximate nearest neighbor search. Practical search examples demonstrate retrieval of semantically relevant articles for queries about distributed messaging patterns, CQRS, and software architecture.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=c_YZazjQrNs>

## Similar posts on daily.dev

- [Getting Started With PgVector in .NET for Simple Vector Search](https://daily.dev/posts/getting-started-with-pgvector-in-net-for-simple-vector-search-wqsbcjmkr) · Milan Jovanović · 5 upvotes · 0 comments
- [Build AI Search in .NET using Postgres and pgvector](https://daily.dev/posts/build-ai-search-in-net-using-postgres-and-pgvector-bcwbj2v0i) · Waseem .NET Newsletter · 0 upvotes · 0 comments
- [Building Vector Similarity Search in PostgreSQL with pgvector](https://daily.dev/posts/building-vector-similarity-search-in-postgresql-with-pgvector-klkt5sztv) · Machine Learning Mastery · 0 upvotes · 0 comments
- [You Don't Need a Vector Database, Postgres Already Has pgvector](https://daily.dev/posts/you-don-t-need-a-vector-database-postgres-already-has-pgvector-d62seekr1) · Prisma Blog · 0 upvotes · 0 comments

---

Tags: [#.net](https://daily.dev/tags/.net), [#postgresql](https://daily.dev/tags/postgresql), [#vector-search](https://daily.dev/tags/vector-search), [#ollama](https://daily.dev/tags/ollama), [#pgvector](https://daily.dev/tags/pgvector)

[View this post on daily.dev](https://daily.dev/posts/build-vector-search-in-net-with-postgres-and-pgvector-6rxktqqyl)
