Search API not working for String in Custom Objects

Hi All,

I’ve been trying to figure out for the past few days why my Search API call won’t work and I’ve been able to figure it out.

Here is a call that returns 0 results

{"filterGroups": [
 {
 "filters": [
 {
 "values": ["SKU_<SKU>","SKU_<SKU>","SKU_<SKU>","SKU_<SKU>","SKU_<SKU>","SKU_<SKU>","SKU_<SKU>","SKU_<SKU>","SKU_<SKU>","SKU_<SKU>"],
 "propertyName": "sku",
 "operator": "IN"
 }
 ]
 }
 ],
 "properties": [
 "sku"
 ],
 "limit": 50,
 "after": 0
 }

BUT, Searching for 1 at a time does work and will return them

{"filterGroups": [
 {
 "filters": [
 {
 "value": "SKU_<SKU>",
 "propertyName": "sku",
 "operator": "EQ"
 }
 ]
 }
 ],
 "properties": [
 "sku"
 ],
 "limit": 50,
 "after": 0
 }

Is there any planned fix for this or am I doing something wrong?

What is interesting to note is that before I put the “SKU_” infront of each of the values only the purely numbered values were being found and not the strings.

Hi, @JosephAstu :waving_hand: Welcome to the community. Hey, @LMeert @RMones, do you have experience with using the search API in this manner?

Thank you! — Jaycee

The EQ operator is NOT case insensitve. I’m trying to search “hs_additional_emails” with EQ and it’s definitely case sensitive, which is a huge problem because then creating a contact fails with a CONTACT ALREADY EXISTS error. What gives?

CONTAINS_TOKEN doesn’t work either.

In my testing just now, it appears the IN filter expects and only matches on lower case values. Change SKU_ to sku_ and it should work. EQ works on a case-insensitive match. I wonder if/why that might be intentional or a bug. Doesn’t appear to be limited to custom objects.
I was also informed you should be able to use EQ but in the value do something like “SKU_<SKU> OR SKU_<SKU> OR …”. I didn’t test that. You could also just build your values string and use a to lowercase type method in whatever language you are using.