Skip to content

Automatically escape punctuation for Redisearch? #2325

Open
@corywatsonhcl

Description

@corywatsonhcl

This is a combination question and then potential feature idea. Given that indexing by TEXT on fields like email address can cause troublesome issues with tokenization, I find myself having to do a lot of escaping on JSON documents that I want to store and index but that have fields where I would expect punctuation. I know I can use TAG to get around this, but we need to dual-index sometimes and as of now Redis is the only DB provider where we have to do this escaping. It's more than a bit messy and seems to be a common thing that is forgotten, causing us issues.

So, I'm wondering if there is a way currently within the package that I've yet to find to configure a client to auto-escape and auto-unescape punctuation characters ,.<>{}[]"':;!@#$%^&*()-+=~ on set and get commands. If not, this could be a useful option to add to help users of the package not have to recursively read through every JSON objects they want to store to comment punctuation. It's more of a nice-to-have than anything, so low priority, but something to potentially consider.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EvaluatingThis ticket is still taken into consideration without a clear path forward.feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions