Entities not appearing in order based on location

Hi! I have a custom experience in which my entities don’t have real addresses (for the sake of privacy), and have a filler Address Line 1 but have the correct City, Region, and Postal Code.
I want the entities to appear in order of proximity of distance to the user.
I have made the different address fields NLP filters but I don’t believe that is allowing for sorting by distance, as a user has reported the coaches are appearing in the same distance every time, regardless of distance. I have also tried using “Default sort order” with distance as the first sorting category, but it did not change anything for the user.

Can you check if the backend is configured correctly for this to work?
Blockers could be

  1. not using real addresses (line 1)
  2. Due to the above, I should not use builtinlocation field as a searchable field
  3. custom experience in general, frontend may be missing something

Thank you!

Hey Emily,

First off, in order to sort by proximity to the user, the algorithm will have to look at the full address to determine a specific lat/long, so it will have to use the filler Address Line 1 to determine the exact location of the entity. Just something to keep in mind.

To ensure the algorithm is sorting by distance, I would suggest adding your own Default Sort Order to the experience with 1) Relevance and 2) Distance. This will allow the most relevant results to show first, and then also ensure the algorithm will sort by distance after that.

One thing to keep in mind with distance sorting is that when the builtin.location NLP filter is triggered, the sorting behaves differently than when an NLP filter for City, Region, or Postal Code is triggered. When the latter group of NLPs are triggered, the results will be sorted by proximity to the user (assuming you have configured the suggested Sort Order mentioned above).

If, on the other hand, the builtin.location NLP filter is triggered, the results will be sorted based on proximity to the location that the NLP detected instead of the location of the user. Just something to keep in mind when it comes to expected functionality with distance sorting.

Hope this helps,
DJ

Hi DJ! Thank you for that explanation!
So do you recommend if I were to include a filler Address line 1, as I do now, but it’s not accurate and may not even exist, I remove the builtin.location NLP filter as a searchable field, considering the sorting for City, Region, and Postal Code would work (given I have Sort Order configured)?

Thanks!

Without some sort of address to pinpoint an exact lat/long, I don’t think the algorithm would be able to sort by proximity, regardless of which NLP filters you have active, because there would be no exact geographic point to reference for what the order of the results should be.

Even with NLPs for City, Region and Postal Code, those NLPs would activate if someone searched a city, for example, but after activating the NLP, the results wouldn’t be able to sort by proximity unless there is an exact lat/long to reference when the algorithm goes to sort them.

Understand! Thank you for clarifying!!