weaviate icon indicating copy to clipboard operation
weaviate copied to clipboard

FR: Can I specify `ef` at search time?

Open andersfylling opened this issue 2 years ago • 5 comments

Instead of updating the schema definition, could I specify an ef argument at search time? Is this something you'd be open to adding?

andersfylling avatar Nov 03 '23 19:11 andersfylling

Seems reasonable, I've added the backlog label. This means upvotes are counted on our Roadmap page.

Maybe this could fit in the gRPC API which is used by the new v4 python client (cc @tsmith023, @dirkkul).

One thing that we need to be aware of: ef is specific to hnsw. WIth other vector types in the future, this property won't make sense. So it should be a conditional or optional property. Maybe even namespaced under something like hnsw.

etiennedi avatar Nov 06 '23 11:11 etiennedi

I am interested to start my open source contribution journey, Can you please assign me this issue?

synapticInvader avatar Jan 05 '24 04:01 synapticInvader

please just start working on it :)

We usually do not assign issues as people sometimes just disappear

dirkkul avatar Jan 05 '24 04:01 dirkkul

IIRC, we can add a ef field to the gRPC search request, and pass it through all the way to hnsw SearchByVector https://sourcegraph.com/github.com/weaviate/weaviate@master/-/blob/adapters/repos/db/vector/hnsw/search.go?L64. This SearchByVector is also an interface method, so adding an argument will need changes in many places.

@dirkkul @etiennedi does the above sounds reasonable?

litlig avatar Feb 08 '24 05:02 litlig

Just wondering if this issue is done, per #3730. If not, let me know if any help is needed.

codeaucafe avatar May 06 '24 18:05 codeaucafe