1. Interfaces

GeoFilterData

Version: 0.6
TypeInterface
Import path@sitecore-cloudsdk/search/server

Geographical data used for filtering search results.

Signature

export interface GeoFilterData {
  distance?: DistanceString;
  location?: LocationData;
}

Properties

NameTypeDescriptionValue
distanceDistanceStringOptional.The radius of the circular geographical area where you want Sitecore Search to return suitable search results for.For example, return search results only for those products that are available for purchase in the area.Format: A number followed by a unit of distance, without spaces.Accepted units
- inchesft - feetyd - yardsnmi - nautical milesmm - millimeterscm - centimetersm - meterskm - kilometers
"8.6ft""16km"
locationLocationDataOptional.The geographical coordinates of the location that the site visitor wants to see search results for.In filters, location represents a location different than the site visitor's current one.By default, Sitecore Search returns search results relevant to the site visitor's current location (geoData.location).geoFilterData.location lets you override the site visitor's current location values with different ones. This lets you return search results for a different location instead of the site visitor's current location.For example, if the site visitor wants to see a list of stores in a different city, not nearby stores, provide that city's location data in geoFilterData.location.N/A
If you have suggestions for improving this article, let us know!