Skip to content

Incorrect Rust example for SeparatorTokens settings #642

Closed
@hak0

Description

@hak0

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.

Activity

ellnix

ellnix commented on Feb 1, 2025

@ellnix
Contributor

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

guimachiavelli commented on Feb 4, 2025

@guimachiavelli
Member

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

curquiza

curquiza commented on Feb 5, 2025

@curquiza
Member

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Incorrect Rust example for SeparatorTokens settings · Issue #642 · meilisearch/meilisearch-rust