Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Search-time expansion_search #501

Closed
2 of 3 tasks
rschu1ze opened this issue Oct 9, 2024 · 1 comment
Closed
2 of 3 tasks

Feature: Search-time expansion_search #501

rschu1ze opened this issue Oct 9, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@rschu1ze
Copy link
Contributor

rschu1ze commented Oct 9, 2024

Describe what you are looking for

The search methods in include/usearch/index_dense.hpp have this signature:

search_result_t search(b1x8_t const* vector, std::size_t wanted, std::size_t thread = any_thread(), bool exact = false) const { return search_(vector, wanted, dummy_predicate_t {}, thread, exact, casts_.from_b1x8); }
[...]

search_ does this:

[...]
index_search_config_t search_config;
[...]
search_config.expansion = config_.expansion_search;
[...]

auto typed_result = typed_->search([...], search_config, [...]);

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 (efConstruction).

Would it be possible to add overloads forsearch or new parameters that allow to set ef_search at search time?

Can you contribute to the implementation?

  • I can contribute

Is your feature request specific to a certain interface?

C++ implementation

Contact Details

[email protected]

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct
@rschu1ze rschu1ze added the enhancement New feature or request label Oct 9, 2024
@rschu1ze
Copy link
Contributor Author

Sorry, this is a duplicate of #500 (I blame it the trashy airport WiFi for that).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant