NRediSearch icon indicating copy to clipboard operation
NRediSearch copied to clipboard

Not In query : In search

Open yashhema opened this issue 4 years ago • 1 comments

Hello, How to do query with Not in operator : say I what to run query where country not in brazil or australia

Query q = new Query($"(@name:{ abc })|(@address:{ cdd })|(@country:-(BRAZIL | AUSTRALIA)")

right now - operator gives error

yashhema avatar Apr 10 '22 14:04 yashhema

@yashhema - sort of hard to say for sure without seeing what you are using to create the index. A query like

FT.SEARCH test "@country:-(Brazil|Australia)"
1) (integer) 2
2) "test:1"
3) 1) "country"
   2) "america"
4) "test:2"
5) 1) "country"
   2) "uk"

Will work if country is a TEXT index - so it could be the index types you are using?

slorello89 avatar May 14 '22 11:05 slorello89