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 *
(integer) 1
“Test Dup”
“value”
“dummy”
“test”
“Test Dup”
“Test”
“value”
“dummy1”
“test”
“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.
In the set of documents on which I’m testing RS2 (2.0.5 - ) I’m getting an unexpected behavior. Running on an exact phrase search in just one textual field, wrapped in quotes.
In the sample there are exactly 5 documents containing the textual word tok1tok2, perfectly in sequence and preceded and followed by others. No document contains the inverse sequence tok2tok1.
Running the following commands, I get the respective number of results:
FT.SEARCH myindex '@textfield:"tok2 tok1"' – 1 Result
From the premise that there is no document containing the sequence tok2tok1, I should receive no result.
The textual field in question is of type NOSTEM, and tok1 e tok2 are very differents.
Commands are sent via redis-cli.
UPDATE:
This problem occurs sporadically only for certain combinations of tokens. It also occurs with earlier versions of RS, all the way back to 1.6.14, the version I stopped at when running the test.