Skip to content

Incorrect Rust example for SeparatorTokens settings #642

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

Closed
hak0 opened this issue Jan 31, 2025 · 3 comments · Fixed by #640
Closed

Incorrect Rust example for SeparatorTokens settings #642

hak0 opened this issue Jan 31, 2025 · 3 comments · Fixed by #640
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@hak0
Copy link

hak0 commented Jan 31, 2025

In the documentation for update-non-seperator-tokens, examples for other languages correctly use the updateNonSeparatorTokens method. However, the Rust example incorrectly uses the .set_dictionary method.

The Rust example should instead use something like:

.set_non_separator_tokens(&vec!["@".to_string(), "#".to_string()])

This issue applies to all APIs under Separator tokens and Non-separator tokens, where Rust code currently references dictionary-related APIs.

@ellnix
Copy link
Contributor

ellnix commented Feb 1, 2025

That's pretty funny, someone messed up their copy-paste. I'll create a PR in the meilisearch-rust repository since those examples are pulled from there.

@guimachiavelli
Copy link
Member

@curquiza this is related to a rust code sample, do you want to transfer it to the correct repo?

@curquiza curquiza transferred this issue from meilisearch/documentation Feb 5, 2025
@curquiza curquiza added documentation Improvements or additions to documentation good first issue Good for newcomers labels Feb 5, 2025
@curquiza
Copy link
Member

curquiza commented Feb 5, 2025

Transferred ✅
For having done/reviewed at least 1 thousand code samples in 10 differents repo so in 10 different languages, I can say that's super easy to make a mistake 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants