Queries related to multiple entries under _geoloc key and can we set another key to be looked up for geolocations?

  • When we have multiple user locations based at different timestamps under the _geoloc key; how does the search get affected?
  • Can we make search lookup another key for geo search data?
  • Can we have all user locations under _geoloc key and make search lookup just the last entry for proximity distance calculations?

Hello @ankushranka,

When we have multiple user locations based at different timestamps under the _geoloc key; how does the search get affected?

The results will not be affected by the timestamp. The engine will look inside all the _geoloc entries and return the most relevant results based on your given query parameter. Can you tell me a bit more about your use case?

Can we make search lookup another key for geo search data?

No you can’t lookup for another key. The geo search data must be under the _geoloc attribute.

Can we have all user locations under _geoloc key and make search lookup just the last entry for proximity distance calculations?

No you can’t the engine will always search on all entries. But what you can do instead is to store the older entries inside an other key and always keep the most up to date in the _geoloc attribute.

Hope that helps!

1 Like

Thank you so much for your speedy response Samuel.

Our use case is to find the most relevant users nearby based on several attributes. We currently are using the approach of storing older location entries under a different key and it works :slight_smile:

Thanks for the clarification. Nice to see that it works!

Please feel free to contact me if you have other questions.