diff --git a/content/develop/interact/search-and-query/basic-constructs/field-and-type-options.md b/content/develop/interact/search-and-query/basic-constructs/field-and-type-options.md index 64e17d99d4..783f1bab13 100644 --- a/content/develop/interact/search-and-query/basic-constructs/field-and-type-options.md +++ b/content/develop/interact/search-and-query/basic-constructs/field-and-type-options.md @@ -232,4 +232,31 @@ You can search for documents with specific text values using the `` or the - Search for a term only in the `title` attribute ``` FT.SEARCH books-idx "@title:dogs" - ``` \ No newline at end of file + ``` + +## Unicode considerations + +Redis Query Engine only supports Unicode characters in the [basic multilingual plane](https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane); U+0000 to U+FFFF. Unicode characters beyond U+FFFF, such as Emojis, are not supported and would not be retrieved by queries including such characters in the following use cases: + +* Querying TEXT fields with Prefix/Suffix/Infix +* Querying TEXT fields with fuzzy + +Examples: + +``` +redis> FT.CREATE idx SCHEMA tag TAG text TEXT +OK +redis> HSET doc:1 tag '😀😁🙂' text '😀😁🙂' +(integer) 2 +redis> HSET doc:2 tag '😀😁🙂abc' text '😀😁🙂abc' +(integer) 2 +redis> FT.SEARCH idx '@text:(*😀😁🙂)' NOCONTENT +1) (integer) 0 +redis> FT.SEARCH idx '@text:(*😀😁🙂*)' NOCONTENT +1) (integer) 0 +redis> FT.SEARCH idx '@text:(😀😁🙂*)' NOCONTENT +1) (integer) 0 + +redis> FT.SEARCH idx '@text:(%😀😁🙃%)' NOCONTENT +1) (integer) 0 +``` \ No newline at end of file diff --git a/content/develop/interact/search-and-query/query/full-text.md b/content/develop/interact/search-and-query/query/full-text.md index 98a2f27e00..37fd35fe60 100644 --- a/content/develop/interact/search-and-query/query/full-text.md +++ b/content/develop/interact/search-and-query/query/full-text.md @@ -117,4 +117,31 @@ If you want to increase the maximum word distance to two, you can use the follow {{< clients-example query_ft ft5 >}} FT.SEARCH idx:bicycle "%%optamised%%" -{{< /clients-example >}} \ No newline at end of file +{{< /clients-example >}} + +## Unicode considerations + +Redis Query Engine only supports Unicode characters in the [basic multilingual plane](https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane); U+0000 to U+FFFF. Unicode characters beyond U+FFFF, such as Emojis, are not supported and would not be retrieved by queries including such characters in the following use cases: + +* Querying TEXT fields with Prefix/Suffix/Infix +* Querying TEXT fields with fuzzy + +Examples: + +``` +redis> FT.CREATE idx SCHEMA tag TAG text TEXT +OK +redis> HSET doc:1 tag '😀😁🙂' text '😀😁🙂' +(integer) 2 +redis> HSET doc:2 tag '😀😁🙂abc' text '😀😁🙂abc' +(integer) 2 +redis> FT.SEARCH idx '@text:(*😀😁🙂)' NOCONTENT +1) (integer) 0 +redis> FT.SEARCH idx '@text:(*😀😁🙂*)' NOCONTENT +1) (integer) 0 +redis> FT.SEARCH idx '@text:(😀😁🙂*)' NOCONTENT +1) (integer) 0 + +redis> FT.SEARCH idx '@text:(%😀😁🙃%)' NOCONTENT +1) (integer) 0 +``` \ No newline at end of file