RediSearch
RediSearch copied to clipboard
FT.AGGREGATE GroupBy Count always returns the attributes values in lower case
My use case: I inserted a document with attribute name = "Nadav" but when running "FT.AGGREGATE GroupBy Count" for that attribute I got: {"nadav": 1} instead of {"Nadav": 1}
Moreover, if I save one document with name = "Nadav" and one document with name = "nAdav" it will return {"nadav": 2} instead of: {{"Nadav": 1, "nAdav":1}}
Thanks @nadavtsa for the question.
This is part of the RediSearch design.
fields with SORTABLE
values are normalized by default to avoid the difference between the sea word at the start and the rest of the sentence.
RediSearch has an additional flag - UNF
which stands for unformatted. This will fix the issue you experience.
@ashtul How do I set this flag? can you give me a command for example?
Thank you very much!
@ashtul Another question: can I set the same field in the schema both as UNF and non-UNF or do I need to create 2 separate indexes?
I'll explain, I need to support case insensitive text search but case sensitive facets
This issue is stale because it has been open for 60 days with no activity.