Skip to content

Commit e376fc9

Browse files
committed
feat: PostgreSQL 백엔드 — pgvector HNSW + pg_trgm + recursive CTE 그래프 순회
PostgreSQLBackend 구현 (asyncpg 기반): - pgvector: HNSW 인덱스 벡터 검색 (cosine distance), embedding_dim 설정 가능 - pg_trgm: 한글/영어 fuzzy 매칭 (similarity()), 미설치 시 ILIKE fallback - FTS: tsvector + plainto_tsquery (simple tokenizer, 한/영 모두 지원) - 그래프 순회: recursive CTE (N-hop 이웃 탐색, 사이클 방지) - 하이브리드 검색: FTS + fuzzy + vector 결과 병합 + resonance scoring - Connection pooling: asyncpg Pool (min=2, max=10) - Batch: 트랜잭션 내 실행 (rollback on error) pg_trgm graceful degradation: - 확장 사용 가능하면 trigram similarity() 사용 - 미설치/충돌 시 ILIKE fallback으로 자동 전환 Integration 테스트: 13개 (CRUD, FTS, fuzzy, vector, hybrid, traversal, prune, decay) 기존 테스트: 93개 유지 (total 106 passed)
1 parent 558a135 commit e376fc9

File tree

3 files changed

+645
-10
lines changed

3 files changed

+645
-10
lines changed

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,7 @@ ignore = ["S101"]
3535
[tool.pyright]
3636
pythonVersion = "3.12"
3737
typeCheckingMode = "strict"
38+
reportMissingTypeStubs = false
39+
reportUnknownMemberType = "warning"
40+
reportUnknownVariableType = "warning"
41+
reportUnknownArgumentType = "warning"

0 commit comments

Comments
 (0)