Query does not return exact match

Hi,

I have a field in my table with text.
When i search for the text, it is considered a sub string and returns all the matches.
I need only the exact match to be return.

Example:

ft.search test *

  1. (integer) 1
  2. “Test Dup”
    1. “value”
    2. “dummy”
    3. “test”
    4. “Test Dup”
  3. “Test”
    1. “value”
    2. “dummy1”
    3. “test”
    4. “Test”

When I do “ft.search test @test:Test” I receive both the values and not just the exact “Test”.

I tried with special characters and it did not help.

It does not happen with all types. For example, if the values are "Test’ and “Test1”, it returns the exact match. It fails only when there is space.

I tried nostem also. The document is created with redis java.

Hello,

Have you tried with a TAG in the schema for the field where you want to do an exact match.

For example

FT.CREATE idx2 SCHEMA value TEXT WEIGHT 5.0 test TAG 


FT.ADD idx2 doc1 1.0 FIELDS "value" "dummy" "test" "Test Dup"

FT.ADD idx2 doc2 1.0 FIELDS "value" "dummy1" "test" "Test"

Then when you do the search (query syntax):

>> FT.SEARCH idx2 "@test:{test}" LIMIT 0 10
1) (integer) 1
2) "doc2"
3) 1) "value"
   2) "dummy1"
   3) "test"
   4) "Test"

Regards
Tug
@tgrall