If your goal is to filter products by specific geo location we recommend creating a separate record for each location and using the distinct parameter to limit the number of records shown. This would allow you to filter by _geoloc and filter or facet by their separate in_stock values. For example, consider the following records
[
{
"name": "product_a",
"_geoloc": {
"lat": 40.639751,
"lng": -73.778925
},
"in_stock": 13,
"id: 5,
},
{
"name": "product_a",
"_geoloc": {
"lat": 51.320751,
"lng": -75.778925
},
"in_stock": 0,
"id: 5,
},
]
With these example records you could set attributeForDistinct to "id" and set distinct to true. This way when your users search for product_a they will only find the most relevant record. If a user filters by location only the best matching location for them will be returned of the variants available. This will also allow them to see the stock for that location specifically. For more guidance on this we recommend our guide on Managing Variants