Setting geo-cordinates for products in shopify

What is the process method to set and pass on geo-cordinates for each product in a shopify store.

I can see on algoisa side what the JSON looks like, but where in shopify would this be set ?

Are they metafeilds or something else ?

This is a really good question, to which I won’t bring good news, sorry in advance.

Algolia can indeed handle geo-coordinates if they’re stored in the _geoloc attribute of the records.

With our shopify integration, you have two ways of adding extra attributes : Metafields and Named Tags.
We store them in a generic way, metafields under the meta attribute and named tags under the named_tags attribute.

So you currently have no way to index those geoloc attributes in Algolia records.
This is definitely a good feature request, and we could think about adding a custom type to metafields, like we’ve done for String arrays.
I’ve added this to our backlog. I can’t unfortunately give you an ETA there, this feature not having been requested by anyone else before, it will definitely be low priority, I hope you’ll understand!


Thanks for the answer :slight_smile:. My followup question is

Using your API or a ZAP integration, could I either

  1. update the current indexes with additional information such as _geoloc or
  2. create a duplicate product index with my additional information (perhaps updated nightly) so that I get the desired result and customise the search snippets to use the other index for geo-searching ?



Any response for this question ?

Hi @frank1, sorry for the delay with my answer! I missed my discourse notifications, sorry about that!

You could indeed, using our API, create a new index which would be a copy of our shopify_products index, which you would enrich with your own _geoloc attributes.
You haven’t been the first one to ask for this feature though, and I’d like to have it baked into the system.
Can I ask you to wait until the end of the week? :slight_smile:

By the way, we’d love to know more about the use-case you’d like to build with those.
Could you expand on what you’re trying to achieve? :slight_smile: