You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created an index with a single document: FT.ADD myIdx doc1 1.0 FIELDS title "hello world" body "lorem ipsum" url "http://redis.io".
From my understanding of query syntax documentation the following queries should have the same meaning:
FT.SEARCH myIdx test ipsum LIMIT 0 1
FT.SEARCH myIdx ipsum test LIMIT 0 1
They both should return the intersection of test AND ipsum.
Apparently the result set is empty for the first query (correct), while doc1 is returned for the second query (wrong).
Hey @amallia! you need to put the terms in quotes, otherwise the redis protocol interprets them as two different arguments. Basically you performed two single term queries. You should do:
Yes, you are right. I thought double quotes was for exact search, but in that case I need to quote twice like FT.SEARCH myIdx '"ipsum lorem"' LIMIT 0 1
yes, you can also do FT.SEARCH myIdx "\"ipsum lorem\"" LIMIT 0 1. Of course in client libraries all this is abstracted away, and it only applies to redis-cli.
Activity
[-]Wrong result is AND query[/-][+]Wrong result in AND query[/+]dvirsky commentedon Mar 2, 2017
Hey @amallia! you need to put the terms in quotes, otherwise the redis protocol interprets them as two different arguments. Basically you performed two single term queries. You should do:
I recommend using the Python or Java libraries for abstraction.
https://github.com/RedisLabs/redisearch-py
https://github.com/RedisLabs/JRediSearch
dvirsky commentedon Mar 2, 2017
PS you can see many examples in https://github.com/RedisLabsModules/RediSearch/blob/master/src/pytest/test.py
dvirsky commentedon Mar 2, 2017
(once you've verified this is indeed not a bug, please close this issue. thanks!)
amallia commentedon Mar 3, 2017
Yes, you are right. I thought double quotes was for exact search, but in that case I need to quote twice like
FT.SEARCH myIdx '"ipsum lorem"' LIMIT 0 1dvirsky commentedon Mar 3, 2017
yes, you can also do
FT.SEARCH myIdx "\"ipsum lorem\"" LIMIT 0 1. Of course in client libraries all this is abstracted away, and it only applies to redis-cli.Add schema support ( FT.ALTER ) (RediSearch#28)
Replace C++ POC with Rust POC (#66)
refactor FullTermDocument* into term::Document term::Metadata term::b…