Getting 400 Bad request error for episerver find
Closed this issue · 3 comments
fulgore7 commented
Line 36 of ClosestLocationBlockController.cs
-
$exception {"The remote server returned an error: (400) Bad Request.\r\nSearchPhaseExecutionException[Failed to execute phase [query], all shards failed; shardFailures {[xIimx-ItQgixbBifpr87Eg][fulgore_celadon][0]: RemoteTransportException[[euw1afinddev01esd01][inet[/10.54.3.201:9300]][search/phase/query]]; nested: SearchParseException[[fulgore_celadon][0]: query[filtered(ConstantScore(+NotFilter(cache(___types:EPiServer.Core.IContent)) cache(IsDeleted$$bool:false) ++NotFilter(cache(___types:EPiServer.Core.ILocalizable)) +NotFilter(cache(___types:EPiServer.Core.IVersionable)) +cache(___types:EPiServer.Core.ILocalizable) +NotFilter(cache(___types:EPiServer.Core.IVersionable)) +cache(Language.Name$$string:en) +NotFilter(cache(___types:EPiServer.Core.ILocalizable)) +cache(___types:EPiServer.Core.IVersionable) ++cache(Status:4) +cache(StartPublishedNormalized$$date:[0001-01-01T05:00:00Z TO 2015-10-28T14:20:00Z]) +NotFilter(cache(BooleanFilter(StopPublish$$date:[\* TO _]))) cache(StopPublish$$date:{2015-10-28T14:20:00Z TO *]) +NotFilter(cache(BooleanFilter(PublishedInLanguage.en.StopPublish$$date:[_ TO _]))) cache(PublishedInLanguage.en.StopPublish$$date:{2015-10-28T14:20:00Z TO *]) +cache(PublishedInLanguage.en.StartPublish$$date:[0001-01-01T05:00:00Z TO 2015-10-28T14:20:00Z]) +NotFilter(cache(___types:EPiServer.Security.IContentSecurable)) cache(UsersWithReadAccess$$string.lowercase:) cache(RolesWithReadAccess$$string:Anonymous RolesWithReadAccess$$string:Everyone) +cache(___types:EPiServer.Core.IContent)))->cache(___types:AlloyDemoKit.Models.Pages.LocationPage)],from[-1],size[1]: Parse Failure [Failed to parse source [{\"size\":1,\"query\":{\"filtered\":{\"query\":{\"constant_score\":{\"filter\":{\"and\":[{\"or\":[{\"not\":{\"filter\":{\"term\":{\"___types\":\"EPiServer.Core.IContent\"}}}},{\"term\":{\"IsDeleted$$bool\":false}}]},{\"or\":[{\"and\":[{\"not\":{\"filter\":{\"term\":{\"___types\":\"EPiServer.Core.ILocalizable\"}}}},{\"not\":{\"filter\":{\"term\":{\"___types\":\"EPiServer.Core.IVersionable\"}}}}]},{\"and\":[{\"term\":{\"___types\":\"EPiServer.Core.ILocalizable\"}},{\"not\":{\"filter\":{\"term\":{\"___types\":\"EPiServer.Core.IVersionable\"}}}},{\"term\":{\"Language.Name$$string\":\"en\"}}]},{\"and\":[{\"not\":{\"filter\":{\"term\":{\"___types\":\"EPiServer.Core.ILocalizable\"}}}},{\"term\":{\"___types\":\"EPiServer.Core.IVersionable\"}},{\"and\":[{\"term\":{\"Status\":4}},{\"range\":{\"StartPublishedNormalized$$date\":{\"from\":\"0001-01-01T05:00:00Z\",\"to\":\"2015-10-28T14:20:00Z\",\"include_lower\":true,\"include_upper\":true}}},{\"or\":[{\"not\":{\"filter\":{\"exists\":{\"field\":\"StopPublish$$date\"}}}},{\"range\":{\"StopPublish$$date\":{\"from\":\"2015-10-28T14:20:00Z\",\"include_lower\":false}}}]}]}]},{\"and\":[{\"or\":[{\"not\":{\"filter\":{\"exists\":{\"field\":\"PublishedInLanguage.en.StopPublish$$date\"}}}},{\"range\":{\"PublishedInLanguage.en.StopPublish$$date\":{\"from\":\"2015-10-28T14:20:00Z\",\"include_lower\":false}}}]},{\"range\":{\"PublishedInLanguage.en.StartPublish$$date\":{\"from\":\"0001-01-01T05:00:00Z\",\"to\":\"2015-10-28T14:20:00Z\",\"include_lower\":true,\"include_upper\":true}}}]}]},{\"or\":[{\"not\":{\"filter\":{\"term\":{\"___types\":\"EPiServer.Security.IContentSecurable\"}}}},{\"term\":{\"UsersWithReadAccess$$string.lowercase\":\"\"}},{\"terms\":{\"RolesWithReadAccess$$string\":[\"Everyone\",\"Anonymous\"]}}]},{\"term\":{\"___types\":\"EPiServer.Core.IContent\"}}]}}},\"filter\":{\"term\":{\"___types\":\"AlloyDemoKit.Models.Pages.LocationPage\"}}}},\"sort\":[{\"_geo_distance\":{\"Coordinates$$geo\":{\"lat\":39.8442,\"lon\":-85.974},\"order\":\"asc\"}}],\"fields\":[\"___types\",\"ContentLink.ID$$number\",\"ContentLink.ProviderName$$string\",\"Language.Name$$string\"]}]]]; nested: ElasticSearchIllegalArgumentException[failed to find mapper for [Coordinates$$geo] for geo distance based sort]; }{[i6Gjg-PsSGqclQQFnOreBw][fulgore_celadon][1]: SearchParseException[[fulgore_celadon][1]: query[filtered(ConstantScore(+NotFilter(cache(___types:EPiServer.Core.IContent)) cache(IsDeleted$$bool:false) ++NotFilter(cache(___types:EPiServer.Core.ILocalizable)) +NotFilter(cache(___types:EPiServer.Core.IVersionable)) +cache(___types:EPiServer.Core.ILocalizable) +NotFilter(cache(___types:EPiServer.Core.IVersionable)) +cache(Language.Name$$string:en) +NotFilter(cache(___types:EPiServer.Core.ILocalizable)) +cache(___types:EPiServer.Core.IVersionable) ++cache(Status:4) +cache(StartPublishedNormalized$$date:[0001-01-01T05:00:00Z TO 2015-10-28T14:20:00Z]) +NotFilter(cache(BooleanFilter(StopPublish$$date:[_ TO _]))) cache(StopPublish$$date:{2015-10-28T14:20:00Z TO *]) +NotFilter(cache(BooleanFilter(PublishedInLanguage.en.StopPublish$$date:[_ TO *]))) cache(PublishedInLanguage.en.StopPublish$$date:{2015-10-28T14:20:00Z TO *]) +cache(PublishedInLanguage.en.StartPublish$$date:[0001-01-01T05:00:00Z TO 2015-10-28T14:20:00Z]) +NotFilter(cache(___types:EPiServer.Security.IContentSecurable)) cache(UsersWithReadAccess$$string.lowercase:) cache(RolesWithReadAccess$$string:Anonymous RolesWithReadAccess$$string:Everyone) +cache(___types:EPiServer.Core.IContent)))->cache(___types:AlloyDemoKit.Models.Pages.LocationPage)],from[-1],size[1]: Parse Failure [Failed to parse source [{\"size\":1,\"query\":{\"filtered\":{\"query\":{\"constant_score\":{\"filter\":{\"and\":[{\"or\":[{\"not\":{\"filter\":{\"term\":{\"___types\":\"EPiServer.Core.IContent\"}}}},{\"term\":{\"IsDeleted$$bool\":false}}]},{\"or\":[{\"and\":[{\"not\":{\"filter\":{\"term\":{\"___types\":\"EPiServer.Core.ILocalizable\"}}}},{\"not\":{\"filter\":{\"term\":{\"___types\":\"EPiServer.Core.IVersionable\"}}}}]},{\"and\":[{\"term\":{\"___types\":\"EPiServer.Core.ILocalizable\"}},{\"not\":{\"filter\":{\"term\":{\"___types\":\"EPiServer.Core.IVersionable\"}}}},{\"term\":{\"Language.Name$$string\":\"en\"}}]},{\"and\":[{\"not\":{\"filter\":{\"term\":{\"___types\":\"EPiServer.Core.ILocalizable\"}}}},{\"term\":{\"___types\":\"EPiServer.Core.IVersionable\"}},{\"and\":[{\"term\":{\"Status\":4}},{\"range\":{\"StartPublishedNormalized$$date\":{\"from\":\"0001-01-01T05:00:00Z\",\"to\":\"2015-10-28T14:20:00Z\",\"include_lower\":true,\"include_upper\":true}}},{\"or\":[{\"not\":{\"filter\":{\"exists\":{\"field\":\"StopPublish$$date\"}}}},{\"range\":{\"StopPublish$$date\":{\"from\":\"2015-10-28T14:20:00Z\",\"include_lower\":false}}}]}]}]},{\"and\":[{\"or\":[{\"not\":{\"filter\":{\"exists\":{\"field\":\"PublishedInLanguage.en.StopPublish$$date\"}}}},{\"range\":{\"PublishedInLanguage.en.StopPublish$$date\":{\"from\":\"2015-10-28T14:20:00Z\",\"include_lower\":false}}}]},{\"range\":{\"PublishedInLanguage.en.StartPublish$$date\":{\"from\":\"0001-01-01T05:00:00Z\",\"to\":\"2015-10-28T14:20:00Z\",\"include_lower\":true,\"include_upper\":true}}}]}]},{\"or\":[{\"not\":{\"filter\":{\"term\":{\"___types\":\"EPiServer.Security.IContentSecurable\"}}}},{\"term\":{\"UsersWithReadAccess$$string.lowercase\":\"\"}},{\"terms\":{\"RolesWithReadAccess$$string\":[\"Everyone\",\"Anonymous\"]}}]},{\"term\":{\"___types\":\"EPiServer.Core.IContent\"}}]}}},\"filter\":{\"term\":{\"___types\":\"AlloyDemoKit.Models.Pages.LocationPage\"}}}},\"sort\":[{\"_geo_distance\":{\"Coordinates$$geo\":{\"lat\":39.8442,\"lon\":-85.974},\"order\":\"asc\"}}],\"fields\":[\"___types\",\"ContentLink.ID$$number\",\"ContentLink.ProviderName$$string\",\"Language.Name$$string\"]}]]]; nested: ElasticSearchIllegalArgumentException[failed to find mapper for [Coordinates$$geo] for geo distance based sort]; }]"} EPiServer.Find.ServiceException
My webconfig entry.
<episerver.find
serviceUrl="http://es-eu-dev-api01.episerver.net/CVP26KNDEEiQNk6ZUIa5FxkpCUQDvQ7Z/"
defaultIndex="fulgore_celadon"/>
espek commented
Hi,
I had the same error and it disappeared after indexing the content to the FIND service in the admin mode (makes sense). Some error checking might prevent the issue?
BR, Esa
jdub3jdub3 commented
Correct, index with Find to fix (for the time being).
JanakaEPiServer commented
Thanks for the comments on resolving. The issue has now been resolved you will now have to supply a Find service URL when starting up the alloy demo kit.