# HNSW is approximate: recall against exact search, hnsw.ef_search, LIMIT above ef_search, and filtered queries
# Hibernate ORM 7.4.17.Final (on the classpath), PostgreSQL 16.15, pgvector 0.8.7, JDK 25
100 query vectors, top 10 each, cosine distance, index chunk_hnsw_cos (m = 16, ef_construction = 64)

== 1. Recall@10 and latency by hnsw.ef_search (the default is 40)
ef_search  recall@10  avg ms per query (indicative)
10         0.725      2.97                  
20         0.874      2.01                  
40         0.966      2.80                  
100        0.995      3.38                  
200        0.999      3.04                  

== 2. LIMIT 100 with the default ef_search = 40
rows requested: 100, rows returned: 40
with hnsw.ef_search = 200:  rows returned: 100

== 3. Filter plus nearest neighbour: where c.category = 3 (10% of the rows), LIMIT 10
default settings:                         4.2 rows returned on average (10 asked for)
SET hnsw.iterative_scan = relaxed_order:   10.0 rows returned on average
first query vector, default settings: 6 rows
