Controlling Text Tokenization and Escaping

    Note: There is a different mechanism for tokenizing text and tag fields, this document refers only to text fields. For tag fields please refer to the Tag Fields documentation.

    1. Escaping separators in both queries and documents is done by prepending a backslash to any separator. e.g. the text will be tokenized as [hello-world, hello, world] . NOTE that in most languages you will need an extra backslash when formatting the document or query, to signify an actual backslash, so the actual text in redis-cli for example, will be entered as hello\\-world .

    2. Repeating spaces or punctuation marks are stripped.

    3. A backslash before the first digit will tokenize it as a term. This will translate - sign as NOT which otherwise will make the number negative. Add a backslash before if you are searching for a float. (ex. -20 -> {-20} vs -\20 -> {NOT{20}})