You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In other words, when a search runs, HNSW parameter expansion_search (aka. efSearch) is populated from the index configuration which is set at index construction time. This feels a bit unnatural, the only two HNSW parameters that should be set at index construction time are connectivity (M) and expansion_add (aka. efConstruction).
Would it be possible to add search overloads or new parameters that allow search-time ef_search parameters?
Can you contribute to the implementation?
I can contribute
Is your feature request specific to a certain interface?
Sorry to reopen. change_expansion_search changes the config_ member of class index_dense_gt. Method index_dense_gt::search_ then picks up whatever expansion_add value is in the index config and builds its index_search_config_t object from it:
The problem is that when multiple callers run search, each with a different ef_search, they need to synchronize (aka. lock) as config_ is per-index. I made a slightly ugly workaround where ef_search is passed to the search without persisting it in the index here (used by this ClickHouse PR). If you like the approach, feel free to pick my commit or change it as you like.
Describe what you are looking for
The
search
methods in include/usearch/index_dense.hpp have this signature:search_
does this:In other words, when a search runs, HNSW parameter
expansion_search
(aka.efSearch
) is populated from the index configuration which is set at index construction time. This feels a bit unnatural, the only two HNSW parameters that should be set at index construction time areconnectivity
(M
) andexpansion_add
(aka.efConstruction
).Would it be possible to add
search
overloads or new parameters that allow search-timeef_search
parameters?Can you contribute to the implementation?
Is your feature request specific to a certain interface?
C++ implementation
Contact Details
[email protected]
Is there an existing issue for this?
Code of Conduct
The text was updated successfully, but these errors were encountered: