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

Builder #42

Merged
merged 11 commits into from
Jan 28, 2025
Merged

Builder #42

merged 11 commits into from
Jan 28, 2025

Conversation

faassen
Copy link
Collaborator

@faassen faassen commented Jan 25, 2025

Here's the builder as I describe it mostly in #40

I've created it as a PR for the refactor-api-wrapper branch but it doesn't really depend on it, and we should merge that branch before we do this (without builder in that case).

If we decide to go for this I would expose the builder on the top level, and make new() and count_only constructor methods crate-only, so that the builder is the only way to construct an index.

[this is a recreation of the pull request against master]

@faassen faassen marked this pull request as draft January 25, 2025 14:41
Copy link
Owner

@ajalab ajalab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The approach that splits the builder looks nicer!

src/lib.rs Outdated Show resolved Hide resolved
@faassen faassen marked this pull request as ready for review January 26, 2025 12:52
Note that there are still two issues left:

* IdConverter isn't automated yet

* The benchmarks can't work with the backend trait somehow.
Note that I couldn't get rid of the `size` field as `sais` uses IdConverter with very
specific sizes. But now the builder should allocate the appropriate size for an
id converter (the default) automatically, handling ajalab#25
@faassen faassen merged commit 5f1832a into ajalab:master Jan 28, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants