Search code examples
commercetoolssphere.io

How to filter for localized fields in the Commercetools ProductProjectionsSearch API?


I tried to filter for the brand but never got any results back. Brand was a localized text attribute on my products. I used the following variations:

variants.attributes.brand:"LEGO" variants.attributes.brand.de:"LEGO" masterVariant.attributes.brand:"LEGO" masterVariant.attributes.brand.de:"LEGO"

I'm using the node.js-SDK btw.


Solution

  • the pattern for filters on attributes of localized text type is

    variants.attributes.{name}.{lang}:"{value}"

    To analyze why this is not working for you, please create a support ticket on https://support.commercetools.com

    Thanks Stefan