November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
I've discovered this only seems to happen when doing a geolocation search. It also gives a 500 error when doing a geolocation search via the Unified search.
Could you post more details about the exception? Especially interested in the response message from the server.
I have pasted the stack trace at pastebin, as it's quite long!
http://pastebin.com/BWVMgyAD
Thanks
Hmm, odd. For debug purposes, could you try adding the below to your query?
.Filter(x => x.MatchType(typeof(TPage))
Where TPage is a type that has a SearchGeoLocation property?
I get the same error.
My pageType has the following for the geolocation
[Display(GroupName = Global.GroupNames.Stores, Name = "Latitude", Prompt = "Latitude")]
public virtual string Latitude { get; set; }
[Display(GroupName = Global.GroupNames.Stores, Name = "Longitude", Prompt = "Longitude")]
public virtual string Longitude { get; set; }
[Ignore]
public virtual GeoLocation Location { get { return new GeoLocation(double.Parse(Latitude), double.Parse(Longitude));} }
My query for the search is:
query = query.Filter(x => x.SearchGeoLocation.WithinDistanceFrom(office, 5.Miles()))
.Filter(y => y.MatchType(typeof (StorePage)))
.Take(10);
Thanks
Hmm, looks like the property is named Location on StorePage's but you're filtering on SearchGeoLocation. Could you try changing its name to SearchGeoLocation and reindex (publish it or run the scheduled job) at least one page with a location?
Great!
It's still a bit odd that you got a 500 though. If you asked the server to sort by the field it would have made sense but not when you only filtered on it. Anyway, glad it fixed it.
Some validation is done in the query parsing step in Elasticsearch for different types (among them geo_point) so if it hasn't been registered (i.e nothing has been indexed for the specific field) it will throw an error.
When I use client.search to perform a search, I get a 500 error returned from the Find API, however when using a unified search, the search works.
Has anyone experienced this before? Does anyone know why this would happen?
Thanks.