Faceted search results returning different results locally from in production

I’m building a site that has faceted searching enabled. Locally, I’m serving my theme using the shopify cli

shopify theme serve

When I run the faceted searches locally, the results are what I would expect, but when I have the exact same theme running in production, I get partial results or no results at all.

The theme I’m working on is still in development, so I’m unable to share it at this time.

Has anyone else run into this issue and know of a fix?

The term I’m searching on is

?filter.v.m.hmr.filter_material=926%20Silver,%20Enamel

I’m still not sure why the results were different for production vs. local, but it turns out the

url_escape filter doesn’t escape the comma.

Everything is fine when I replace the commas in my filter value with an escaped value.

{{ collection.url }}?{{ filter_value.param_name }}={{ filter_value.value | url_escape | replace: ",", "%2C" }}