#random

Filtering Attribute to Exclude Specific City

TLDR Atul asked how to filter a city attribute excluding 'Berlin.' Kishore Nallan suggested it's not possible directly but to use a string array and !=.

Powered by Struct AI

1

Mar 01, 2023 (7 months ago)
Atul
Photo of md5-b28e2b6cff9ce32901c5ee87b38aecd5
Atul
07:47 PM
I have another question on search:
We have an attribute called {"city":"Berlin Chennai Pune Mumbai"}
and i want to apply a filter like: filter_by=city:!Berlin means, city not contains Berlin .
Is it possible?
If yes, please help.
Mar 02, 2023 (7 months ago)
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
01:36 AM
Yes:

filter_by=city:!= Berlin
Atul
Photo of md5-b28e2b6cff9ce32901c5ee87b38aecd5
Atul
05:38 AM
Kishore Nallan
This is not contains (like) , this is equals (=)
05:39
Atul
05:39 AM
I am looking for city not contains Berlin
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
05:49 AM
So you want not contains of a word in a multi word string?
Atul
Photo of md5-b28e2b6cff9ce32901c5ee87b38aecd5
Atul
06:51 AM
Yes
You are right
thanks
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
06:52 AM
That's not possible at the moment. You can make the list of cities a string array and then use !=

1