gorse-io / gorse

Gorse open source recommender system engine
https://gorse.io
Apache License 2.0
8.49k stars 778 forks source link

hnsw: add ability to configure ef search #803

Closed dankinder closed 7 months ago

dankinder commented 7 months ago

I needed a quick solution for using HNSW in Go and found this package nice, but noticed that it forces ef = efConstruction. I'm optimizing for a use case where I build an effectively static index. Build time doesn't matter to me but query speed and recall do. So I want to be able to set efConstruction high but keep ef where it is.

I've left this behaving in exactly the same manner as before as the default.

zhenghaoz commented 7 months ago

Thank you