Working with Sitecore 9 (Update 1), SXA 1.7.1 and Azure Search.

Components added on the page: Map, Location Finder, Search Results (all components have same search signature).

I am facing this issue only in the fr-FR site I have created in SXA. I created a page in fr-FR and all the mentioned component on it. When I try to search for any location, the Search Results component does not load any results instead just shows the loading symbol. The console is throwing an error saying 400 Bad Request. enter image description here enter image description here

I checked all the items used in this scenario like Scopes, Facets or Rendering Variants. I found out whenever I add Distance Facet in the component Location Finder it breaks the search and throws 400. Reminder: It is working fine in other languages.

Search query:


enter image description here


Exception: Sitecore.ContentSearch.Azure.Http.Exceptions.BadRequestException
Message: Error in the request URI, headers, or body
Source: Sitecore.ContentSearch.Azure
   à Sitecore.ContentSearch.Azure.Http.SearchServiceClient.EnsureSuccessStatusCode(HttpResponseMessage response)
   à Sitecore.ContentSearch.Azure.Http.SearchServiceClient.Search(String expression)
   à Sitecore.ContentSearch.Azure.Http.CompositeSearchService.Search(String expression)
   à Sitecore.XA.Foundation.VersionSpecific.Search.Azure.LinqToCloudIndex1.Execute(CloudQuery query, Int32& countDoc, Int32& totalDoc, Dictionary2& facetResult)
   à Sitecore.XA.Foundation.VersionSpecific.Search.Azure.LinqToCloudIndex`1.ExecuteTResult
   à Sitecore.XA.Feature.Search.Controllers.SearchController.GetResults(String v, String q, String s, String l, String g, String o, Int32 e, Int32 p, String sig, String site, String itemid)

Nested Exception

Exception: Sitecore.ContentSearch.Azure.Http.Exceptions.AzureSearchServiceRESTCallException
Message: {"error":{"code":"","message":"Invalid expression: Unrecognized 'Edm.Geography' literal 'geography'Point(2,2908303 48,8870341)'' at '26' in 'geo.distance(geolocation, geography'Point(2,2908303 48,8870341)') lt 200' with reason 'Expecting token type \"Number\" with text \"\" but found \"Type:[7] Text:[,]\".'.\r\nParameter name: $filter"}}
  • There must be an exception somewhere. Please check sitecore.log, search.log and console for errors. As far as I remember we did major change in Azure Search logic in 1.7.1. Can you upgrade and test? Aug 28, 2019 at 15:14
  • @DawidRutkowski I am using SXA 1.7.1. I mentioned the wrong version, its a mistake on my behalf.
    – PSS
    Aug 28, 2019 at 15:24
  • What about normal and search logs? Any errors there? Aug 28, 2019 at 18:02
  • Hi @DawidRutkowski, I have added the log also, please check. Thanks.
    – PSS
    Sep 16, 2019 at 13:35


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.