Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Hybrid code search on Azure SQL and SQL Server 2025, end to end

Описание и применение

Объединённый поиск кода на Azure SQL и SQL Server 2025 без внешних хранилищ векторов, использующий DiskANN, полнотекстовый поиск и рекурсивную ранжировку.

Задача

Integrating Azure SQL and SQL Server 2025 vector search, full‑text, and DiskANN into a single database for code search without external vector stores.

Результат

A unified, end‑to‑end code search pipeline that runs on both Azure SQL and SQL Server 2025, eliminating external vector stores and simplifying deployment.

Рабочий процесс

  • Define CodeFiles and CodeChunks tables with VECTOR column
  • Chunk source files using Roslyn syntax tree boundaries
  • Serialize embeddings as float[] and cast to VECTOR in SQL
  • Insert chunks and embeddings into CodeChunks
  • Create DiskANN index on Embedding column
  • Preflight vector support by casting literal VECTOR
  • Build index after data load
  • Implement query procedure with dynamic SQL to handle both VECTOR_SEARCH spellings
  • Fuse three retrieval legs via reciprocal rank fusion in T‑SQL
  • Apply cross‑encoder reranker and relevance gate
  • Deploy to Azure SQL serverless or self‑hosted SQL Server 2025

Доказательства

Azure SQL and SQL Server 2025 both have a native VECTOR type, a DiskANN index, and VECTOR_SEARCH.

Источник

The three ranked lists get fused with reciprocal rank fusion inside a stored procedure, a cross‑encoder reranks the survivors, and a relevance gate throws out results that are nearest‑neighbour artifacts rather than answers.

Источник

If you only ever deploy to one of them you can hardcode the right one and stop reading here. If you develop locally and deploy to Azure, which is the normal arrangement, you need both in the same codebase.

Источник

  • Дата записи: 2026-10-01T13:41:01.533Z