Add hibernate-vector module: pgvector similarity search with Hibernate 7.4.17.Final and Spring Data JPA 4.2.0 (float[] to vector/halfvec, cosine and L2 in HQL and Criteria, SearchResults methods, HNSW plans from auto_explain and five ways a query stops using the index, recall vs hnsw.ef_search, filtered-search row loss, Spring AI PgVectorStore comparison; PostgreSQL 16.15, pgvector 0.8.7)
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b4XrpfdpsacrvqnrBM
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
-- The HNSW index the tests build on the chunk table (20,000 rows, 64 dimensions).
|
||||
-- Hibernate's schema generator cannot create it (see output/08-failures.txt), so it lives in a migration like this one.
|
||||
-- vector_cosine_ops must match the operator the queries use: cosine_distance(..) in HQL is "<=>" in SQL.
|
||||
create index chunk_hnsw_cos on chunk using hnsw (embedding vector_cosine_ops) with (m = 16, ef_construction = 64);
|
||||
Reference in New Issue
Block a user