ruvector/docs
rUv a4948d9545 fix(hnsw): resolve segfault with parameterized queries (Issue #141)
This commit fixes a critical P0 bug where HNSW indexes on ruvector
columns would crash PostgreSQL with a segmentation fault when using
parameterized queries (prepared statements, ORMs, application drivers).

Root Cause:
- Query vector extraction failed for parameterized queries
- Code fell back to zero vector without validation
- Zero vector caused segfault during HNSW search

Changes:
- Add multi-method query vector extraction pipeline
  1. Direct RuVector::from_polymorphic_datum()
  2. Text parameter conversion for parameterized queries
  3. Validated varlena fallback with dimension checking
- Add query_valid flag to track extraction success
- Add validation before search execution:
  - Reject empty/invalid query vectors with clear errors
  - Reject all-zero vectors (invalid for similarity search)
  - Validate dimension match between query and index
- Apply same fixes to IVFFlat for consistency

Testing:
- Added regression tests for parameterized queries
- Added tests for zero vector error handling
- Added tests for dimension mismatch errors
- Added 384-dimension production-scale tests

Fixes: #141
See: docs/adr/ADR-0027-hnsw-parameterized-query-fix.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 16:34:42 +00:00
..
adr fix(hnsw): resolve segfault with parameterized queries (Issue #141) 2026-01-28 16:34:42 +00:00
analysis docs: reorganize into subfolders 2026-01-21 23:43:50 -05:00
api docs: Add Cypher reference, include Tiny Dancer, fix WASM build 2025-11-26 12:54:04 +00:00
architecture feat(prime-radiant): Universal Coherence Engine with Sheaf Laplacian AI Safety (#131) 2026-01-22 21:27:27 -05:00
benchmarks docs: reorganize into subfolders 2026-01-21 23:43:50 -05:00
cloud-architecture Implement global streaming optimization for 500M concurrent streams 2025-11-20 18:51:26 +00:00
code-reviews docs: reorganize into subfolders 2026-01-21 23:43:50 -05:00
dag docs(dag): add comprehensive Neural DAG Learning implementation plan 2025-12-29 22:15:55 +00:00
development feat(micro-hnsw-wasm): Add Neuromorphic HNSW v2.3 with SNN Integration (#40) 2025-12-01 22:30:15 -05:00
examples feat(nervous-system): Complete bio-inspired neural architecture implementation 2025-12-28 04:05:08 +00:00
gnn feat(micro-hnsw-wasm): Add Neuromorphic HNSW v2.3 with SNN Integration (#40) 2025-12-01 22:30:15 -05:00
guides feat(postgres): Add HNSW index and embedding functions support (#62) 2025-12-09 11:14:52 -05:00
hnsw docs: Reorganize documentation and add postgres README 2025-12-02 16:45:44 +00:00
hooks feat(cli): Implement full hooks system in Rust CLI 2025-12-27 01:08:36 +00:00
implementation docs: reorganize into subfolders 2026-01-21 23:43:50 -05:00
integration docs: reorganize into subfolders 2026-01-21 23:43:50 -05:00
nervous-system docs: reorganize into subfolders 2026-01-21 23:43:50 -05:00
optimization docs: reorganize into subfolders 2026-01-21 23:43:50 -05:00
plans/subpolynomial-time-mincut chore(docs): Clean up and reorganize documentation structure 2025-12-25 19:39:44 +00:00
postgres Feat/ruvector postgres v2 (#82) 2025-12-25 17:02:55 -05:00
project-phases Clean up repository structure and organize documentation 2025-11-20 19:50:03 +00:00
publishing feat(training): RuvLTRA v2.4 Ecosystem Edition - 100% routing accuracy (#123) 2026-01-20 20:08:30 -05:00
research feat(delta-behavior): Complete Δ-behavior implementation with WASM 2026-01-28 04:18:34 +00:00
ruvllm docs: reorganize into subfolders 2026-01-21 23:43:50 -05:00
security docs: reorganize into subfolders 2026-01-21 23:43:50 -05:00
sparse-inference feat: Add PowerInfer-style sparse inference engine with precision lanes (#106) 2026-01-04 23:40:31 -05:00
sql feat(postgres): Add ruvector-postgres extension with SIMD optimizations (#42) 2025-12-02 09:55:07 -05:00
testing Clean up repository structure and organize documentation 2025-11-20 19:50:03 +00:00
training docs: reorganize into subfolders 2026-01-21 23:43:50 -05:00
.gitkeep Clean up repository structure and organize documentation 2025-11-20 19:50:03 +00:00
INDEX.md docs: reorganize into subfolders 2026-01-21 23:43:50 -05:00
README.md docs: reorganize into subfolders 2026-01-21 23:43:50 -05:00
REPO_STRUCTURE.md docs: reorganize into subfolders 2026-01-21 23:43:50 -05:00

RuVector Documentation

Complete documentation for RuVector, the high-performance Rust vector database with global scale capabilities.

📚 Documentation Structure

docs/
├── adr/                    # Architecture Decision Records
├── analysis/               # Research & analysis docs
├── api/                    # API references (Rust, Node.js, Cypher)
├── architecture/           # System design docs
├── benchmarks/             # Performance benchmarks & results
├── cloud-architecture/     # Cloud deployment guides
├── code-reviews/           # Code review documentation
├── dag/                    # DAG implementation
├── development/            # Developer guides
├── examples/               # SQL examples
├── gnn/                    # GNN/Graph implementation
├── guides/                 # User guides & tutorials
├── hnsw/                   # HNSW index documentation
├── hooks/                  # Hooks system documentation
├── implementation/         # Implementation details & summaries
├── integration/            # Integration guides
├── nervous-system/         # Nervous system architecture
├── optimization/           # Performance optimization guides
├── plans/                  # Implementation plans
├── postgres/               # PostgreSQL extension docs
├── project-phases/         # Development phases
├── publishing/             # NPM publishing guides
├── research/               # Research documentation
├── ruvllm/                 # RuVLLM documentation
├── security/               # Security audits & reports
├── sparse-inference/       # Sparse inference docs
├── sql/                    # SQL examples
├── testing/                # Testing documentation
└── training/               # Training & LoRA docs

Getting Started

Architecture & Design

API Reference

Performance & Benchmarks

Security

Implementation

Specialized Topics

Development

Research

  • research/ - Research documentation
    • cognitive-frontier/ - Cognitive frontier research
    • gnn-v2/ - GNN v2 research
    • latent-space/ - HNSW & attention research
    • mincut/ - MinCut algorithm research

For New Users

  1. Start with Getting Started Guide
  2. Try the Basic Tutorial
  3. Review API Documentation

For Cloud Deployment

  1. Read Architecture Overview
  2. Follow Deployment Guide
  3. Apply Performance Optimizations

For Contributors

  1. Read Contributing Guidelines
  2. Review Architecture Decisions
  3. Check Migration Guide

For Performance Tuning

  1. Review Optimization Guide
  2. Run Benchmarks
  3. Check Analysis

📊 Documentation Status

Category Directory Status
Getting Started guides/ Complete
Architecture architecture/, adr/ Complete
API Reference api/ Complete
Performance benchmarks/, optimization/, analysis/ Complete
Security security/ Complete
Implementation implementation/, integration/ Complete
Development development/, testing/ Complete
Research research/ 📚 Ongoing

Total Documentation: 170+ comprehensive documents across 25+ directories


🔗 External Resources


Last Updated: 2026-01-21 | Version: 0.1.29 | Status: Production Ready