feat: add pgvector semantic search
...
- Add pgvector dependency and Alembic migration (vector extension, embedding
column, HNSW index with cosine ops)
- Add nomic-embed-text embedding model to config
- Add OllamaClient.embed() method for /api/embed endpoint
- Add embedding generation stage to PropertyPipeline (_stage_embed)
- Add PropertyRepository.update_embedding() and search_similar() with
cosine distance + optional filters (deal_type, city, price range)
- Add POST /api/v1/search/similar endpoint with query embedding + filters
- Add SimilarSearchRequest/Response schemas
- Add backfill script for existing listings
- Update docker-compose.yml to pgvector/pgvector:pg16 image
- Update .env to use Docker PostgreSQL on port 5433
Co-Authored-By: Claude <noreply@anthropic.com>
Eugene Sukhodolskiy
committed
1 day ago