Is there a way to implement a max radius for location search without a bounding box or static filters? At the moment, “near me” searches will rank by proximity but still show results that are over 1,000 miles away. I found a module discussing minLocationRadius but nothing about setting a max. Thanks!
You can use
minLocationRadius (from this unit) to set the maximum distance to search when returning locations. Note that you have to set the distance in meters.
A bit more explanation on how this property works - When a location filter is applied, this attribute impacts the minimum radius (in meters) used in filtering results. It should be a number between 0 and 10,000,000, exclusive. When a location filter is applied, we’ll pick whichever is larger: the minLocationRadius, or the radius we determine for the filter.
For example, say a user searched “Manhattan”. Our system will determine a radius of 60,000 meters (60 km). If the
minLocationRadius is set to 75,000, we’d only return entities within 75 km.
Conversely, if a minimum was set to 10,000, we’d return entities within 60 km instead.
This parameter applies to both universal and vertical search, but can be overridden on vertical via the distance filter.
minLocationRadius property is saying “do not apply a
radius smaller than
Thank you for the response @Kristy_Huang !
I’m a bit confused about how setting this property, which ensures a radius smaller than minLocationRadius won’t be applied, also sets a maximum distance.
For example, I applied a minLocationRadius of 80,467.2 meters, or 50 miles, to a vertical, but locations that are over 1,000 miles away still show up for “near me” searches, so it doesn’t seem to be filtering locations out that are beyond that 50 mile max radius I’m trying to apply in this case.
I am facing the same issue and wondering if you ultimately had a resolution / alternative for this one? Thanks!
I have a similar question here for “near me” queries. I’m trying to limit the radius of these queries to return results within 25 miles or 50 miles of a user’s location. I tried setting the “minLocationRadius” and this was not working to limit the results to within 50 miles of the user’s location. Is there any solution here to set a max distance?