We've updated the way product search works for metafields that are a list of text (list.single_line_text_metafields
) to make it easier to find similar values.
Now, you can use the 'equals' comparison to match specific values in the list. For example, here we would find all products with 'United States', but not 'United States Minor Outlying Islands':
Previously, you could use the 'contains' comparison to filter lists but this would lead to both fields being matched.
The 'equals' comparison still supports matching against the entire list if you include a JSON-encoded list. Using the example above, if the search value is ["United States"]
the search will return products that only have 'United States' in the list, and not any other countries.
Learn more about searching and editing list metafields.