0

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:

https://mylocal.com/fr/sxa/search/results/?l=fr-FR&s={1AB997C8-36F9-4A14-81CD-02801D89B7CF}&itemid={839D6B67-A046-4E84-9F12-6E1BDDB4197C}&sig=&autoFireSearch=true&v={0EA6CE1F-3008-4783-95BF-E550C4CC2182}&p=20&g=48.856614|2.3522219000000177&o=Distance,Ascending&site=mylocal

enter image description here

Log:

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"}}
4
  • 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? – Dawid Rutkowski Aug 28 '19 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 '19 at 15:24
  • What about normal and search logs? Any errors there? – Dawid Rutkowski Aug 28 '19 at 18:02
  • Hi @DawidRutkowski, I have added the log also, please check. Thanks. – PSS Sep 16 '19 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.