Skip to content

FEATURE REQUEST: utf-8 support in autocomplete #7

@mannol

Description

@mannol

It's me again!
Just tried some searches containing utf-8 characters and here are the results:

// add utf8-encoded string
redisCommand(ctx, "FT.SUGADD userslex %b 1", "\u010Caji\u0107", sizeof("\u010Caji\u0107") - 1); 

// None of the two queries bellow have found the match
redisCommand(ctx, "FT.SUGGET userslex %b MAX 2 FUZZY", "\u010Caj", sizeof("\u010Caj") - 1);
redisCommand(ctx, "FT.SUGGET userslex %b MAX 2 FUZZY", "aji", sizeof("aji") - 1);

// However, if the utf8 character comes after the searched characters
redisCommand(ctx, "FT.SUGADD userslex %b 1", "Caji\u0107", sizeof("Caji\u0107") - 1);

// The query can find it
redisCommand(ctx, "FT.SUGGET userslex %b MAX 2 FUZZY", "aji", sizeof("aji") - 1);

Is it possible to implement this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions