0

I am using Redisearch module in Redis and trying to search for a value in TEXT field using below query. It returns all the documents with lower case values like 'test or Test' and no data which has all the upper case letters 'TEST' are being returned.

FT.search MyIndex @MyField:"test"

Kindly suggest something. Thank you.

I have a similar Index as created below, I get all the records only when I add 'tjøp | TJØP' or 'tjøp*' in the query.

FT.CREATE MyIndex SCHEMA name TEXT

ft.add MyIndex "110011" 1.0 FIELDS name "tjøp plane"

ft.add MyIndex "110012" 1.0 FIELDS name "file TJØP"

ft.add MyIndex "110013" 1.0 FIELDS name "one TJØP more"

ft.add MyIndex "110015" 1.0 FIELDS name "one TJØP a/s more"

127.0.0.1:6379> ft.search MyIndex @name:"tjøp"

  1. (integer) 1
  2. "110011"
    1. "name"
    2. "tj\xc3\xb8p plane" 127.0.0.1:6379> ft.search MyIndex @name:"tjøp | TJØP"
  3. (integer) 4
  4. "110011"
    1. "name"
    2. "tj\xc3\xb8p plane"
  5. "110015"
    1. "name"
    2. "one TJ\xc3\x98P a/s more"
  6. "110013"
    1. "name"
    2. "one TJ\xc3\x98P more"
  7. "110012"
    1. "name"
    2. "file TJ\xc3\x98P"
chaitra d
  • 45
  • 5
  • RediSearch should return "the all upper case" documents as well. Can you share a minimal set of commands to reproduce this? – Pieter Cailliau May 23 '21 at 08:46
  • @PieterCailliau I am using only mentioned command to search for the records having all possible upper-lowercase combinations of the word 'test' in MyField. – chaitra d May 24 '21 at 09:57
  • I did some tests and RediSearch returns all variants of upper cases of “test”. So I wanted to ask for a minimal set of commands (ft.create, hset, ft.search, …) that can be used to reproduce the behaviour you see from an empty database + the version of Redis and RediSearch as it looks like a bug to me. – Pieter Cailliau May 25 '21 at 17:47
  • I updated the details with the commands I am using. And the versions are 'Redis version found by RedisSearch : 6.2.1' and 'RediSearch version 2.0.6 (Git=v2.0.4-55-gb0db8b2e)' – chaitra d May 26 '21 at 11:10
  • I believe this is a bug, I suspect it's related to the special character because I couldn't reproduce it with "test" and "TEST". Can you please open an issue on GH https://github.com/RediSearch/RediSearch/ the example you listed? – Pieter Cailliau May 26 '21 at 22:26
  • I have already opened an issue regarding this, but will add the detailed example. https://github.com/RediSearch/RediSearch/issues/2015 – chaitra d May 28 '21 at 10:06

0 Answers0